Skip to content

Commit

Permalink
* Suppress call-by-reference warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly techtonik committed Mar 11, 2005
1 parent 5e73267 commit cc0b848
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SearchReplace.php
Expand Up @@ -262,7 +262,7 @@ function search($filename)
$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
Expand All @@ -281,7 +281,7 @@ function search($filename)
}

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) {
Expand Down Expand Up @@ -332,7 +332,7 @@ function quickSearch($filename)
// 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) {
Expand Down

0 comments on commit cc0b848

Please sign in to comment.