wrong parameter count for preg_replace() on cron run.

 Warning: Wrong parameter count for preg_replace() in ***/modules/dutchstemmer/dutchstemmer.module on line 108
 Warning: Wrong parameter count for preg_replace() in ***/modules/dutchstemmer/dutchstemmer.module on line 124

Might be caused by CCK.

Comments

splash112’s picture

Wrong parameter count for preg_replace() in /home/tit.nl/public_html/modules/dutchstemmer/dutchstemmer.module op lijn 112.
Wrong parameter count for preg_replace() in /home/tit.nl/public_html/modules/dutchstemmer/dutchstemmer.module op lijn 124.

Definetly not by CCK. I didn't install that. Maybe search404? That module also created some of these errors.
Cron.php made a few pages....

Otherwise excellent module that gives my site some badly needed search results!

Thanks!

splash112’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new6.03 KB

Solved!

Sorry, I'm no good at patching, so I committed the changed module.

Seems Preg_replace got an optional extra variable in PHP5. It was parsed in the function but nowhere declared, so I just cut it out. The module seems to be working now for PHP4 too.

http://cn2.php.net/manual/en/function.preg-replace.php

ednique’s picture

Had the same problem while searching for "evenwichtig"
Installed the new module file supplied by splash112 and it worked...

the remloval of the php5 param has fixed it for php4...
a better solution would be to check the php version prior to adding or removing that parameter...

Bèr Kessels’s picture

Version: 4.7.x-1.x-dev » master
StatusFileSize
new3.19 KB

Here is a patch.
The $count parameter was used all over the place, yet never referenced to. Not only ugly and messy codewise, but it apparently breaks in PHP4. This patch fixes that.

clemens.tolboom’s picture

Assigned: Unassigned » clemens.tolboom

Have to check for D6.

franskuipers’s picture

Assigned: clemens.tolboom » Unassigned
Status: Reviewed & tested by the community » Fixed

See commit

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.