cvs: pear /File_SearchReplace SearchReplace.php
| From: | anatoly techtonik | Date: | Fri, 11 Mar 2005 20:32:40 +0000 |
| Subject: | cvs: pear /File_SearchReplace SearchReplace.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-30221@lists.php.net to get a copy of this message | ||
techtonik Fri Mar 11 15:32:40 2005 EDT
Modified files:
/pear/File_SearchReplace SearchReplace.php
Log:
* Suppress call-by-reference warnings
http://cvs.php.net/diff.php/pear/File_SearchReplace/SearchReplace.php?r1=1.11&r2=1.12&ty=u
Index: pear/File_SearchReplace/SearchReplace.php
diff -u pear/File_SearchReplace/SearchReplace.php:1.11
pear/File_SearchReplace/SearchReplace.php:1.12
--- pear/File_SearchReplace/SearchReplace.php:1.11 Fri Mar 11 13:37:57 2005
+++ pear/File_SearchReplace/SearchReplace.php Fri Mar 11 15:32:40 2005
@@ -32,7 +32,7 @@
// | Author: Richard Heyes <richard@phpguru.org> |
// +-----------------------------------------------------------------------+
//
-// $Id: SearchReplace.php,v 1.11 2005/03/11 18:37:57 techtonik Exp $
+// $Id: SearchReplace.php,v 1.12 2005/03/11 20:32:40 techtonik Exp $
//
// Search and Replace Utility
//
@@ -262,7 +262,7 @@
$file_array = file($filename);
if (empty($this->ignore_lines) && $this->php5) { // PHP5 acceleration
- $file_array = str_replace($this->find, $this->replace, $file_array,
&$occurences);
+ $file_array = str_replace($this->find, $this->replace, $file_array, $occurences);
} else { // str_replace() doesn't return number of occurences in PHP4
// so we need to count them manually and/or filter strings
@@ -281,7 +281,7 @@
}
if ($this->php5) {
- $file_array[$i] = str_replace($this->find, $this->replace,
$file_array[$i], &$counted);
+ $file_array[$i] = str_replace($this->find, $this->replace,
$file_array[$i], $counted);
$occurences += $counted;
} else {
foreach ($local_find as $fk => $ff) {
@@ -332,7 +332,7 @@
// because I haven't decided yet whether it is bug or feature)
if ($this->php5) {
- $file_array[$i] = str_replace($this->find, $this->replace, $file_array[$i],
&$counted);
+ $file_array[$i] = str_replace($this->find, $this->replace, $file_array[$i],
$counted);
$occurences += $counted;
} else {
foreach ($local_find as $fk => $ff) {