yii2tech/ar-softdelete

"restore" records - Call to a member function restore() on null

WitekS opened this issue · 1 comments

When I restore the record I get an error,

Call to a member function restore () on null

which is probably related to this. By using:

public static function find (){          return parent: find () -> where (['isDeleted' => false]);  }

for the record deleted
$item = Item :: findOne ($ id);
$item will be null
$item->restore(); // restore record
This way, you can not restore marked items as deleted

Default scope you apply to your model does not relate to this extension.