a tiny mvc framework for php using php-activerecord

don't use object references for transactions; fixes php crash

+3 -3
+3 -3
lib/php-activerecord/lib/Model.php
··· 785 785 $this->verify_not_readonly('insert'); 786 786 787 787 $table = static::table(); 788 - $obj = &$this; 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 - $obj = &$this; 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 - $obj = &$this; 1020 + $obj = $this; 1021 1021 1022 1022 $ret = self::transaction(function() use ($obj, $table, $pk) { 1023 1023 if (!$obj->invoke_callback('before_destroy',false))