WordPress.org

Ready to get started?Download WordPress

Forums

StageShow
[resolved] Error when trying to check out (2 posts)

  1. Gergster
    Member
    Posted 7 months ago #

    I am receiving the following error when trying to check out:

    Warning: Creating default object from empty value in .../plugins/stageshow/include/stageshowlib_salesplugin.php on line 584

    Warning: Cannot modify header information - headers already sent by (output started at .../plugins/stageshow/include/stageshowlib_salesplugin.php:584) in .../plugins/stageshow/include/stageshowlib_salesplugin.php on line 716

    I have no other plugins activated.
    Any idea what I'm doing wrong?

    Thanks

    http://wordpress.org/plugins/stageshow/

  2. Malcolm
    Member
    Plugin Author

    Posted 7 months ago #

    Thanks Gerster for your error report.

    You don't say what version of StageShow you are using, but assuming it is 2.1.6, then the code at stageshowlib_salesplugin.php line 584 is as follows:

    $rslt->paypalParams = array();

    This includes an implicit creation of a StdClass object (as $rslt) and it appears that this is generating a PHP warning. As far as I can tell this Warning is only generated if the PHP E_STRICT reporting level is set, which is not usually the case for production servers. I actually thought that WordPress turned off E_STRICT anyway, so why the warning is generated is a bit of a mystery.

    The checkout should redirect to the PayPal page, and this cannot happen if any output has been generated, in your case the PHP Warning has already been output so the redirect fails.

    As for a fix .... you could try adding code before the line generating the error to explicitly create the object, as follows:

    $rslt = new stdClass();

    Alternatively, if E_STRICT is turned on, turn it off.

    I've added this change to my core code, so this will be included in future releases.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.