From 351ee7caf9ecc74c4f719989bf0d504df0bcb93b Mon Sep 17 00:00:00 2001 From: tokul Date: Sun, 6 Mar 2005 12:54:24 +0000 Subject: [PATCH] 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 --- functions/strings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"; -- 2.25.1