Update class-opalestate-property.php

This commit is contained in:
Hoang Huu 2019-09-28 15:00:45 +07:00
parent 758df32f28
commit 89b2eeb2d1

@ -571,11 +571,15 @@ class Opalestate_Property {
return $this->get_metabox_value( 'gallery', true );
}
/**
* Count gallery images.
*
* @return int
*/
public function get_gallery_count() {
$count = $this->get_gallery();
return count( $count );
return is_array( $count ) && $count ? count( $count ) : 0;
}
/**