From: jakubvrana Date: Fri, 17 Apr 2009 13:25:35 +0000 (+0000) Subject: Prevent name conflicts in function minification X-Git-Tag: v3.0.0~935 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=3aaeff0dc2f8eb6fb49d66da273b91346eb064a2;p=adminer.git Prevent name conflicts in function minification git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@585 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/_compile.php b/_compile.php index 19e4deec..d30942f1 100644 --- a/_compile.php +++ b/_compile.php @@ -103,8 +103,10 @@ function php_shrink($input) { $number = 0; foreach ($short_functions as $key => $val) { if (isset($defined_functions[$key])) { - $short_functions[$key] = short_identifier($number, implode("", range('a', 'z')) . '_'); - $number++; + do { + $short_functions[$key] = short_identifier($number, implode("", range('a', 'z')) . '_'); + $number++; + } while (isset($short_functions[$short_functions[$key]])); } }