A small patch that fixes the parameter list in hook_nodeapi() so that it's compatible with PHP 5.3.

CommentFileSizeAuthor
#1 talk-php5.3-640388-1.patch729 bytesMark Theunissen

Comments

Mark Theunissen’s picture

StatusFileSize
new729 bytes
cwgordon7’s picture

Would that be at the expense of PHP 4 compatibility? (If so, we need to add a minimum PHP version statement to the info block).

berdir’s picture

The change would in fact break PHP 4 compatibility.

However, using & in hook_nodeapi() is just fine and correct. *If* you recieve a warning, something does call the hook in a wrong way which basically means the the feature never worked.

So you need to find out who is calling that hook wrongly, see #360605-200: PHP 5.3 Compatibility (and my comment above) for more information.

avpaderno’s picture

The hook is defined as hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) in the API documentation.

If something must be changed to make Drupal compatible with PHP 5.3, that must be done at Drupal core level (which it seems it has already done, as I don't get any errors running Drupal on PHP 5.3).

oriol_e9g’s picture

Issue tags: +PHP 5.3

tagged

berdir’s picture

Status: Active » Closed (won't fix)

I think this can be closed, the error is somewhere else.