]> granicus.if.org Git - php/commitdiff
- Prevent notices from showing up if inner's current() does not return a string
authorMarcus Boerger <helly@php.net>
Fri, 7 Oct 2005 23:14:49 +0000 (23:14 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 7 Oct 2005 23:14:49 +0000 (23:14 +0000)
ext/spl/examples/recursivetreeiterator.inc

index 62198c8d3646b649ae1ddf028e15358dbfe088a9..d525bc07827fd1b94ebfc129c31e0fa057732cc2 100755 (executable)
@@ -60,7 +60,7 @@ class RecursiveTreeIterator extends RecursiveIteratorIterator
         */
        function getEntry()
        {
-               return $this->callToString ? $this->__toString() : parent::current();
+               return $this->callToString ? $this->__toString() : @(string)parent::current();
        }
 
        /** @return string to place after the current element