Hello:
I am experiencing errors due to my PHP version. I am working with PHP5 and I am getting some PHP version related problems.

I am changing every piece of code where I get errors so I will try to help with migration to PHP5 just posting my custom fixes. Everybody is invited to help with changes. I haven't experience with CVS so I will need help with patches. I will post here small fixes for PHP5.

I got The White Screen of Death so i added this to my index.php:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

Proposed changes:

Error:

Fatal error: Call to a member function get_value() on a non-object in /YOUR_PATH/sites/all/modules/signup/signup.module on line 1683

At function signup_view_user_list_access - Line 1683
Original code:

  return $user->uid == $view->argument[$argument_name]->get_value();

Proposed solution:

  return $user->uid == (is_object($view->argument[$argument_name]) ? $view->argument[$argument_name]->get_value() : FALSE);
CommentFileSizeAuthor
#4 signup-object-check.patch970 bytesjohn franklin

Comments

john franklin’s picture

+1

I used a slightly different solution to fix it.

return ($view->argument[$argument_name] != null) && ($user->uid == $view->argument[$argument_name]->get_value());

Might I suggest merging yours and mine to:

return (is_object($view->argument[$argument_name])) && ($user->uid == $view->argument[$argument_name]->get_value());
Holoduke’s picture

nice logic.

jacobmn’s picture

Brilliant, guys. Thanks for this. I was running into this as well... As an addition, I would also like to say that after making this change I was getting the same error but for line 25 of sites/all/modules/signup/views/plugins/signup_plugin_access_user_signup_list.inc.

I changed that line from:

return $account->uid == $argument->get_value();

to

return (is_object($argument)) && ($account->uid == $argument->get_value());

and everything seems to be fine again. Also having a strange issue in that all anonymous users must have the 'view all signups' permission to see any views that contain signup-related info. Maybe it's unrelated but in case others are seeing it, you can simply enable that perm for now and disable the display of signed-up users for nodes under the advanced settings fieldset on the modules config page. Don't have the energy to fix that issue on my site properly at the moment.

john franklin’s picture

Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new970 bytes

Without this fix, the site will suffer a WSOD, which makes this at least a Priority:Major patch.

Here is a patch with both the fixes in #1 and #3.

SeanA’s picture

These fixes seem to be working properly. Related issue for 7.x-dev.

avpaderno’s picture

Assigned: Holoduke » Unassigned
Status: Needs review » Closed (outdated)
Issue tags: -upgrade php5 error, -php5

I am closing this issue, as Drupal 6 is no longer supported.