check if is a fetch empty result

This commit is contained in:
Jacson Passold 2018-05-29 19:22:12 -03:00
parent 220a15e7e6
commit 95535e48e8
1 changed files with 1 additions and 1 deletions

View File

@ -658,7 +658,7 @@ abstract class Repository {
public function diff( $old = 0, $new ) {
$old_entity = null;
if ( $old === 0 ) { // self diff or other entity?
if ( $old === 0 || is_array($old) && count($old) == 0 ) { // self diff or other entity?
$id = $new->get_id();
if ( ! empty( $id ) ) { // there is a repository entity?