1) Installed FlexiFilter 6.x-1.1-rc2 on Drupal 6.12

2) whet to Preview screen and entered ==Hello Dolly== and got error:
warning: uniqid() expects at least 1 parameter, 0 given in
.../modules/flexifilter/flexifilter.admin.inc on line 916.

3) According to article at http://drupal.org/node/204335
the fix is to substitute (line 916 in flexifilter.admin.inc):

$uniqid = uniqid();

with

$this->unique_id = uniqid(rand(), true);

4) I did it and it worked.

Comments

apaderno’s picture

uniqid() requires the first parameter, in PHP 4.
That is clearly documented in the PHP documentation, but it is also reported in the example the documentation uses.

// no prefix
// works only in PHP 5 and later versions
$token = md5(uniqid());

// better, difficult to guess
$better_token = md5(uniqid(mt_rand(), true));
jcouture’s picture

kiam,

Thank you. However, because Drupal is a big system and Flexifilter is a relatively stable module, I don't have a clue as to WHERE to put your code :-)

apaderno’s picture

I don't have a clue as to WHERE to put your code

The code I reported is simply the example code reported in the PHP documentation. My comment was for the maintainer of the project, who probably forgot about the support for PHP4, or to mark his module for PHP5 only.

apaderno’s picture

Version: 6.x-1.1-rc2 » 6.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, which is for a not supported Drupal version.