X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdba.php;h=f11df6f17ed634a0a3d159f83b1eb245af1c51a2;hb=3e701b90ac1b2341833f6847c97c68a7f770afaa;hp=cae045d874cb384e5d4dac8176175a30acdaac90;hpb=8d8dc2d060ee1d8d5f7754aef2459e5e3f1aa1a9;p=friendica.git diff --git a/include/dba.php b/include/dba.php index cae045d874..f11df6f17e 100644 --- a/include/dba.php +++ b/include/dba.php @@ -230,6 +230,16 @@ class dba { } } + /** + * Checks if $array is a filled array with at least one entry. + * + * @param $array mixed A filled array with at least one entry + * @return Whether $array is a filled array + */ + public static function is_result ($array) { + return (is_array($array) && count($array) > 0); + } + function __destruct() { if ($this->db) if($this->mysqli) @@ -340,4 +350,3 @@ function dbesc_array(&$arr) { function dba_timer() { return microtime(true); } -