com php-src: fixed reverse mode for --zpp: compat/replace.php
| From: | Anatol Belski | Date: | Wed, 29 Jan 2014 11:52:38 +0000 |
| Subject: | com php-src: fixed reverse mode for --zpp: compat/replace.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75844@lists.php.net to get a copy of this message | ||
Commit: e2bdd427580c89b12471862d783dd9b8e1304ee5
Author: Anatol Belski <ab@php.net> Wed, 29 Jan 2014 12:52:38 +0100
Parents: b28101697237e30007017c4ff029e61b6337faf6
Branches: str_size_and_int64
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e2bdd427580c89b12471862d783dd9b8e1304ee5
Log:
fixed reverse mode for --zpp
Changed paths:
M compat/replace.php
Diff:
diff --git a/compat/replace.php b/compat/replace.php
index 9bcba19..2009229 100644
--- a/compat/replace.php
+++ b/compat/replace.php
@@ -131,13 +131,16 @@ if ($replace_zpp || $replace_zpp_compat) {
foreach ($raw_specs as $item) {
if ($reverse_replace) {
$rep = str_replace(array_values($zpp_map), array_keys($zpp_map), $item);
+ if ($rep != $item) {
+ $specs['"' . $rep . '"'] = '"' . $item
.'"';
+ }
} else {
$rep = str_replace(array_keys($zpp_map), array_values($zpp_map), $item);
+ if ($rep != $item) {
+ $specs['"' . $item . '"'] = '"' . $rep
.'"';
+ }
}
- if ($rep != $item) {
- $specs['"' . $item . '"'] = '"' . $rep
.'"';
- }
}
if ($replace_zpp_compat) {