• Resolved independent hostels

    (@independent-hostels)


    HI, when I updated your plug in today I received the following error when trying to access the dashboard etc.:

    Fatal error: Can’t use method return value in write context in /home/bmwbrass/public_html/wp-content/plugins/event-list/includes/db.php on line 156

    I have resolved this by removing the plugin files in the file manager but I now cannot use your plugin to show our events.

    Please can you help?

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi there,

    Experienced same issue on one of my sites, just updated the plugin 10 mins ago. Can we roll back to a previous version of the plugin?

    Yes, I’m getting the same error. Have you tested this on PHP5, as I suspect that may be the issue.

    Thread Starter independent hostels

    (@independent-hostels)

    I think I am using PHP version 4 (4.0.10.18) though.

    Good point.

    The affected line is 156 of includes/db.php.

    I think this may be caused by a limitation of the function empty() on versions below 5.5. I think I’m on 5. Upgrading my PHP version is not an option for me at the moment.

    I’m on PHP 5.6.31, I don’t have the severe DB failure that others observed, but the update still appears to break features (missing “Events” link in the widget, for example). Given the latest bug reports about links disappearing, I have not dared adding new events to my list.

    Same failure here. I don’t know which PHP version, though I could find out if necessary.

    Mibuthu’s change below solves my failure problem.

    • This reply was modified 6 years, 9 months ago by GordonScott.
    Plugin Author mibuthu

    (@mibuthu)

    Thanks for your reports and sorry for the inconvenience.

    So for the first issue you are correct: changing line 156 of includes/db.php to:
    return (bool)$wpdb->update($this->table, $sqldata, array('id' => $event_data['id']), $sqltypes);
    should fix this issue.

    But I think there are some more general issues and/or issues with older php-versions. I will do some more checks now and will release a fixed version as soon as possible.

    If you see any other error messages in your logs please report them here. This will help me to identify the issue.

    Of course you can revert to the older version in the meanwhile. There was no change in the database or the options, so you can copy the old files into the plugin directory without any downsides.

    • This reply was modified 6 years, 9 months ago by mibuthu.
    Plugin Author mibuthu

    (@mibuthu)

    I have released a new version just some minutes ago. This should fix all these issues.

    That was quick! Thank you. I can confirm that the error I reported (Fatal error: Can’t use method return value in write context… includes/db.php) has now gone away.

    Thank you.

    There is an another:

    PHP Fatal error: Can’t use function return value in write context in /www/wp-content/plugins/event-list/includes/sc_event-list.php on line 108

    This one don’t produce an blank page but all the layout is broken.

    Thread Starter independent hostels

    (@independent-hostels)

    Seems to be working for me! Thank you 🙂

    Plugin Author mibuthu

    (@mibuthu)

    @dddenis: This issue is also fixed in the new version 0.7.12. If you update, the error should be gone.

    I just thought I’d update.

    The patch fixed the problem.
    I’ve now also updated to 0.7.12 also with no obvious problem.

    Thanks Mibuthu.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Fatal Error’ is closed to new replies.