Running replace on my content caused my content to go completely blank. In the error log, I found the following error:

Wrong parameter count for preg_replace() in \sites\all\modules\scanner\scanner.module on line 877.

Current 6.x-1.0 code includes the use of the count variable on preg_replace, but that was only offered starting with php 5.1.0.
I created this patch to do a version check and if prior to 5.1.0 get the count via preg_match_all() before the replace. This will maintain all current functionality and make it compatible with PHP4.

CommentFileSizeAuthor
#1 scanner-402434-1.patch1.1 KBjongrimm

Comments

jongrimm’s picture

StatusFileSize
new1.1 KB

Suggested patch is attached.

jongrimm’s picture

Status: Active » Needs review
aasarava’s picture

Many thanks, Jon. I'll try to review and commit the patch as soon as I dig out from a pile of work!

aasarava’s picture

Sorry for the slow response. I don't have PHP4 set up on a machine, so I can't test out this patch. Can anyone else using Search and Replace Scanner with PHP4 please test and let me know if it passes? Thanks!

damienmckenna’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

I am sorry, but we're not supporting the D6 version of the module anymore.