From: tokul Date: Sun, 6 Mar 2005 12:54:24 +0000 (+0000) Subject: adding is_array() test to output of get_class_methods() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=351ee7caf9ecc74c4f719989bf0d504df0bcb93b;p=squirrelmail.git adding is_array() test to output of get_class_methods() git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8957 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/strings.php b/functions/strings.php index aba2bfd4..49addede 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -871,8 +871,8 @@ function sm_print_r() { if (is_object($var)) { // get class methods if $var is object $aMethods=get_class_methods(get_class($var)); - // make sure that array is not empty - if ($aMethods!=array()) { + // make sure that $aMethods is array and array is not empty + if (is_array($aMethods) && $aMethods!=array()) { echo "Object methods:\n"; foreach($aMethods as $method) { echo '* ' . $method . "\n";