cvs: phpdoc /scripts/iniupdate ini-update.php
| From: | Nuno Lopes | Date: | Sat, 29 Sep 2007 22:27:59 +0000 |
| Subject: | cvs: phpdoc /scripts/iniupdate ini-update.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-105@lists.php.net to get a copy of this message | ||
nlopess Sat Sep 29 22:27:59 2007 UTC
Modified files:
/phpdoc/scripts/iniupdate ini-update.php
Log:
improve the C macro expander (i.e. do not expand macros inside of strings
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/iniupdate/ini-update.php?r1=1.13&r2=1.14&diff_format=u
Index: phpdoc/scripts/iniupdate/ini-update.php
diff -u phpdoc/scripts/iniupdate/ini-update.php:1.13 phpdoc/scripts/iniupdate/ini-update.php:1.14
--- phpdoc/scripts/iniupdate/ini-update.php:1.13 Sat Sep 29 22:02:29 2007
+++ phpdoc/scripts/iniupdate/ini-update.php Sat Sep 29 22:27:58 2007
@@ -165,13 +165,13 @@
/* replace macros and make the $default var */
$new = $arr[0];
+ $old = null;
$i = 0;
- do {
+ while ($new[0] !== '"' && $new !== $old && ++$i <
MAX_MACRO_EXPAND_DEPTH) {
$old = $new;
$new = strtr($new,$replace);
-
- } while ($new !== $old && ++$i < MAX_MACRO_EXPAND_DEPTH);
+ }
$default = $new;