Two things I noticed were broken in php 4:

(1) Cannot save flexifilters,

(2) stripos() function is undefined.

This qualifies as critical because it is a show-stopper for php 4-driven sites.

Comments

bstanfield’s picture

I'd really like to use the MediaWiki filter on a new site I'm working on, but don't have the option of PHP 5. I'd love to see this stripos bug fixed.

I'm not much of a code slinger, but I did find this:

If you're using PHP < 5, you can use this alternate function, same thing like stripos:

if (!function_exists("stripos")) {
  function stripos($str,$needle) {
   return strpos(strtolower($str),strtolower($needle));
  }
}

Not sure if that's of any help or not.

cwgordon7’s picture

Status: Active » Needs review

Yes, this is certainly possible; however, it seems to be more than this, as saving a filter does not work either. But I'm happy to commit this once I hear from Corsix.

huayen’s picture

Same problem on my PHP 4 driven site.

Definitely qualified as a critical issue.

cwgordon7’s picture

Just the stripos error? Or also the save error?

huayen’s picture

As I submit posting the node, an error page came out, saying something like "..../sites/modules/flexifilter... *** function ..not defined..." (sorry I already uninstalled the module, so not remember exactly what the error looked like). So, the module completely not worked.

huayen’s picture

Following error occured for both 'Save' and 'Preview'
-----------------------------
Fatal error: Call to undefined function: stripos() in /home/.../sites/all/modules/flexifilter/flexifilter.components.inc on line 480

cwgordon7’s picture

Status: Needs review » Fixed

The stripos() error has been fixed and committed to HEAD and the DRUPAL-6--1 branch.

huayen’s picture

I downloaded '6.x-1.1-rc1' version again, installed, but still the same problem. Did you updated the released file? Thanks.

cwgordon7’s picture

By definition of being a release, it is never updated. The fixes are currently solely available in CVS HEAD and CVS DRUPAL-6--1. A 6.x-1.1 release is awaiting several other pending patches.

bstanfield’s picture

Just wanted to extend my thanks for the quick fix. My site's up and running with the HEAD version.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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