From c07ce049e1369fd5828f11dac95d3bb47768a2e0 Mon Sep 17 00:00:00 2001 From: Stefan Neufeind Date: Sun, 23 Feb 2014 12:34:13 +0100 Subject: [PATCH] Revert "[CLEANUP] Replace strlen() with === for zero length check" This reverts commit de27a20afbd8f413f60029afc5622c7b33212322 Change-Id: I078d2f7bbff605c91d83a9853e8feb9c31d57ccc Reviewed-on: https://review.typo3.org/27792 Reviewed-by: Stefan Neufeind Tested-by: Stefan Neufeind --- Classes/FrontendEditPanel.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index a744def..5a9a10a 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -196,9 +196,7 @@ class FrontendEditPanel { $cBuf = rtrim(preg_replace('/<[^<]*>$/', '', $cBuf)); $secureCount--; } - $content = $cBuf !== '' && $secureCount - ? substr($content, 0, strlen($cBuf)) . $icon . substr($content, strlen($cBuf)) - : $icon . $content; + $content = strlen($cBuf) && $secureCount ? substr($content, 0, strlen($cBuf)) . $icon . substr($content, strlen($cBuf)) : ($content = $icon . $content); } else { $content .= $icon; }