• Resolved aferrari321

    (@aferrari321)


    In classes/Pods.php:316 first argument should be a string and not an object.
    Replace $this->api with $pod to fix.

    Thanks,
    Alessandro

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @aferrari321

    As you can see here: https://github.com/pods-framework/pods/blob/master/classes/PodsData.php#L276-L281
    PodsData accepts an object as well.

    Cheers, Jory

    Thread Starter aferrari321

    (@aferrari321)

    Hi Jory,
    thanks for quick reply.

    I had this error
    09-Apr-2020 10:18:13 UTC] PHP Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/classes/PodsAPI.php:113
    so I think there’s some kind of problem.
    My change fixed it.

    Thanks,
    Alessandro

    Thread Starter aferrari321

    (@aferrari321)

    Some context can be needed.
    This is the error stack:

    
    #0 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/classes/PodsAPI.php(89): PodsAPI->__construct()
    #1 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/includes/classes.php(73): PodsAPI::init()
    #2 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/classes/PodsData.php(280): pods_api()
    #3 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/includes/classes.php(95): PodsData->__construct()
    #4 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/classes/Pods.php(316): pods_data()
    #5 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/includes/classes.php(22): Pods->__construct()
    #6 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/classes/PodsRESTHandlers.php(35): pods()
    #7 /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/classes/Po in /storage/var/www/base.foodweb.it/htdocs/wp-content/plugins/pods/classes/PodsAPI.php on line 113
    

    php version is 7.4

    Plugin Contributor Jim True

    (@jimtrue)

    Please migrate this to a Bug Report if you feel this is actually a bug, because our forums are strictly for support.

    Please file a bug report at: https://github.com/pods-framework/pods/issues/new. Include any relevant screenshots, your process of how you got the error/problem and any relevant code. Thanks!

    Thread Starter aferrari321

    (@aferrari321)

    I couldn’t find where to report bugs myself so thought it was here.
    Thanks,
    Alessandro

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fix : classes/Pods.php:316’ is closed to new replies.