From 71cbc22bc018a9871fe05ea7d239034a73ec8911 Mon Sep 17 00:00:00 2001 From: vChabot Date: Tue, 22 Nov 2011 14:59:30 +0000 Subject: [PATCH] // fix bug from 1.4 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10435 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Media.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/Media.php b/classes/Media.php index e83ab4319..5f7dfe164 100755 --- a/classes/Media.php +++ b/classes/Media.php @@ -105,7 +105,11 @@ class MediaCore preg_match_all('/[a-zA-Z0-9]+=[\"\\\'][^\"\\\']*[\"\\\']/is', $preg_matches[2], $args); $args = $args[0]; sort($args); - $output = $preg_matches[1].' '.implode(' ', $args).'>'; + // if there is no args in the balise, we don't write a space (avoid previous : , now : <title>) + if (empty($args)) + $output = $preg_matches[1].'>'; + else + $output = $preg_matches[1].' '.implode(' ', $args).'>'; return $output; }