Removing explicit call of toString
authorTim Düsterhus <timwolla@arcor.de>
Thu, 2 Feb 2012 16:36:50 +0000 (17:36 +0100)
committerTim Düsterhus <timwolla@arcor.de>
Thu, 2 Feb 2012 16:36:50 +0000 (17:36 +0100)
PHP will call it in every string context as of PHP 5.2

wcfsetup/install/files/lib/util/StringUtil.class.php

index 52bf7d7c42729071476f5ca8d9a15631e5ff9ca7..1887229aa992a844fc616d9d8ef0c50cd2286c95 100644 (file)
@@ -142,9 +142,6 @@ class StringUtil {
         * @return      string          $string
         */
        public static function decodeHTML($string) {
-               if (is_object($string)) 
-                       $string = $string->__toString();
-               
                $string = str_ireplace('&nbsp;', ' ', $string); // convert non-breaking spaces to ascii 32; not ascii 160
                return @html_entity_decode($string, ENT_COMPAT, 'UTF-8');
        }