Supercron, like many other Drupal 6.x modules, has php 5.3 compatibility issues. In this case, the function theme_supercron_settings() should accept a value, not a reference. Without it, the admin/settings/supercron does not display correctly.

Patch attached.

Comments

pillarsdotnet’s picture

Status: Active » Needs review

Could you explain why an array should be passed by value, not by reference?

I know this is true for objects, but I was unaware that it is also true for arrays.

Can you point to some php 5.3 docs that explain this? Or at least describe the change in behavior your patch makes?

john franklin’s picture

StatusFileSize
new27.79 KB

Pre-patch: going to admin/settings/supercron displays a corrupted settings page (see image) and the error:

warning: Parameter 1 to theme_supercron_settings() expected to be a reference, value given in /usr/share/drupal6/includes/theme.inc on line 656.

Post-patch: the admin/settings/supercron page works as expected and no error is displayed.

I did the patch this way because (a) it doesn't change core and (b) it is similar to other php 5.3 patches I've seen.

pillarsdotnet’s picture

Version: 6.x-1.4-beta1 » 6.x-2.x-dev
StatusFileSize
new510 bytes

Okay, so it's because that function gets called by call_user_func_array().

+1 on the patch, then.

Here's a re-roll against CVS HEAD.

cor3huis’s picture

Same for line 140
- function supercron_settings(&$form_state) {
to
+ function supercron_settings($form_state) {

I bet, just reviewing now

cor3huis’s picture

Title: PHP 5.3 Compatibility » Saving settings form not PHP 5.3 Compatible
Status: Needs review » Reviewed & tested by the community

Tested and it solves the issue at hand.

NOTE: manually also changed "supercron_settings(&$form_state) {" to "supercron_settings($form_state) {"
mind the &.

We hate &, it PHP not C ;)

pillarsdotnet’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new764 bytes

Confirmed that supercron_settings() also gets called via call_user_func_array().

Re-rolled patch.

cor3huis’s picture

Status: Needs review » Reviewed & tested by the community

This part of issues looks solved, tested via the supercron.combined.patch found here http://drupal.org/node/749606#comment-4013476

pillarsdotnet’s picture

Abandoned module?

pillarsdotnet’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Danzki’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

This patch solves my problem.