do not use ?finally?-statement (not available for PHP <= 5.4)
This commit is contained in:
parent
297c56e29d
commit
59d7857ffb
2 changed files with 6 additions and 5 deletions
|
|
@ -82,10 +82,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$stmt->close();
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
finally {
|
catch(Exception $e) {
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,11 +190,10 @@
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
$this->db->setAutocommit(true);
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
finally {
|
$this->db->setAutocommit(true);
|
||||||
$this->db->setAutocommit(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue