Commit e3f6faf5 by Alexander Kochetov

&& => || fix

parent f12518f4
......@@ -667,7 +667,7 @@ class ActiveRecord extends Model
*/
public function insert($runValidation = true, $attributes = null)
{
if ($runValidation && !$this->validate($attributes) && !$this->beforeSave(true)) {
if ($runValidation && !$this->validate($attributes) || !$this->beforeSave(true)) {
return false;
}
$values = $this->getDirtyAttributes($attributes);
......@@ -747,7 +747,7 @@ class ActiveRecord extends Model
*/
public function update($runValidation = true, $attributes = null)
{
if ($runValidation && !$this->validate($attributes) && !$this->beforeSave(false)) {
if ($runValidation && !$this->validate($attributes) || !$this->beforeSave(false)) {
return false;
}
$values = $this->getDirtyAttributes($attributes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment