]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Array to string conversion in queuemanager logger
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Sep 2013 22:40:23 +0000 (00:40 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Sep 2013 22:40:23 +0000 (00:40 +0200)
lib/queuemanager.php

index 72eff6e463182d55404620250cdf79464cd50d46..37204b6d5f820bfb242dbc09aaf5702285cd37d7 100644 (file)
@@ -143,14 +143,16 @@ abstract class QueueManager extends IoManager
                 return "$class $object->id";
             }
             return $class;
-        }
-        if (is_string($object)) {
+        } elseif (is_string($object)) {
             $len = strlen($object);
             $fragment = mb_substr($object, 0, 32);
             if (mb_strlen($object) > 32) {
                 $fragment .= '...';
             }
             return "string '$fragment' ($len bytes)";
+        } elseif (is_array($object)) {
+            return 'array with ' . count($object) .
+                   ' elements (keys:[' .  implode(',', array_keys($object)) . '])';
         }
         return strval($object);
     }