From: Tim Düsterhus Date: Thu, 2 Feb 2012 16:36:50 +0000 (+0100) Subject: Removing explicit call of toString X-Git-Tag: 2.0.0_Beta_1~1360^2~36^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aaacfe5dce23c6120f468d68e1ba186a18f652c3;p=GitHub%2FWoltLab%2FWCF.git Removing explicit call of toString PHP will call it in every string context as of PHP 5.2 --- diff --git a/wcfsetup/install/files/lib/util/StringUtil.class.php b/wcfsetup/install/files/lib/util/StringUtil.class.php index 52bf7d7c42..1887229aa9 100644 --- a/wcfsetup/install/files/lib/util/StringUtil.class.php +++ b/wcfsetup/install/files/lib/util/StringUtil.class.php @@ -142,9 +142,6 @@ class StringUtil { * @return string $string */ public static function decodeHTML($string) { - if (is_object($string)) - $string = $string->__toString(); - $string = str_ireplace(' ', ' ', $string); // convert non-breaking spaces to ascii 32; not ascii 160 return @html_entity_decode($string, ENT_COMPAT, 'UTF-8'); }