tangled
alpha
login
or
join now
jcs.org
/
halfmoon
0
fork
atom
a tiny mvc framework for php using php-activerecord
0
fork
atom
overview
issues
pulls
pipelines
don't use object references for transactions; fixes php crash
jcs.org
14 years ago
a850784b
5ce155f1
+3
-3
1 changed file
expand all
collapse all
unified
split
lib
php-activerecord
lib
Model.php
+3
-3
lib/php-activerecord/lib/Model.php
···
785
785
$this->verify_not_readonly('insert');
786
786
787
787
$table = static::table();
788
788
-
$obj = &$this;
788
788
+
$obj = $this;
789
789
790
790
$ret = self::transaction(function() use ($obj, $table, $validate) {
791
791
if (($validate && !$obj->_validate() || !$obj->invoke_callback('before_create',false)))
···
866
866
throw new ActiveRecordException("Cannot update, no primary key defined for: " . get_called_class());
867
867
868
868
$table = static::table();
869
869
-
$obj = &$this;
869
869
+
$obj = $this;
870
870
871
871
$ret = self::transaction(function() use ($obj, $table, $pk) {
872
872
if (!$obj->invoke_callback('before_update',false))
···
1017
1017
throw new ActiveRecordException("Cannot delete, no primary key defined for: " . get_called_class());
1018
1018
1019
1019
$table = static::table();
1020
1020
-
$obj = &$this;
1020
1020
+
$obj = $this;
1021
1021
1022
1022
$ret = self::transaction(function() use ($obj, $table, $pk) {
1023
1023
if (!$obj->invoke_callback('before_destroy',false))