[evolvis-commits] r17570: correct fix for the warning that led to r17569:↵ $tooltip is always a string, and $tooltip[0] is its first char,↵ except in PHP, unlike in C, it issues a warning on an empty string

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Sep 27 11:56:12 CEST 2011


Author: mirabilos
Date: 2011-09-27 11:56:12 +0200 (Tue, 27 Sep 2011)
New Revision: 17570

Modified:
   trunk/gforge_base/evolvisforge/gforge/www/themes/evolvis/Theme.class.php
Log:
correct fix for the warning that led to r17569:
$tooltip is always a string, and $tooltip[0] is its first char,
except in PHP, unlike in C, it issues a warning on an empty string


Modified: trunk/gforge_base/evolvisforge/gforge/www/themes/evolvis/Theme.class.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/www/themes/evolvis/Theme.class.php	2011-09-23 07:48:24 UTC (rev 17569)
+++ trunk/gforge_base/evolvisforge/gforge/www/themes/evolvis/Theme.class.php	2011-09-27 09:56:12 UTC (rev 17570)
@@ -120,10 +120,8 @@
 
 	function emit_headlink($inblock,$tooltip,$redslash,$redtext,$target,$text) {
 		$tooltip = util_html_secure(util_ifsetor($tooltip,""));
-		if(is_array($tooltip)) {
-			if ($tooltip[0] == '-') {
-				$tooltip = "";
-			}
+		if ($tooltip && $tooltip[0] == '-') {
+			$tooltip = "";
 		}
 
 		if ($inblock || $tooltip) {



More information about the evolvis-commits mailing list