• Hi,

    I am seeing this PHP notice in debug.log on my local install
    WooCommerce version: 4.3.1
    WordPress version: 5.4.2
    PHP version: 7.4.8
    Advanced Product Size Charts for WooCommerce Premium by theDotstore – 2.0.4

    [09-Aug-2020 08:21:49 UTC] PHP Notice:  Trying to get property 'ID' of non-object in F:\laragon\www\Zephyrs\wp-content\plugins\woo-advanced-product-size-chart\admin\class-size-chart-for-woocommerce-admin.php on line 226
    [09-Aug-2020 08:21:49 UTC] PHP Notice:  Trying to get property 'post_type' of non-object in F:\laragon\www\Zephyrs\wp-content\plugins\woo-advanced-product-size-chart\admin\class-size-chart-for-woocommerce-admin.php on line 227

    Please guide / fix

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dotstore

    (@dots)

    Hello koolpal,

    Thanks for reaching out to us.

    We have reviewed same line no at our side and no any notice is coming.

    Solution:

    Please replace condition with below at line no: 225 on same file as mentioned in above path.

    if ( 'post.php' === $hook_suffix && isset( $post->ID ) && isset( $post->post_type ) ) {

    Hope this resolve your query.

    Thanks,

    Thread Starter KoolPal

    (@koolpal)

    @dots Please review and make the changes in the plugin itself and push an update.

    If I manually change the code in the plugin It will break in the next update.

    [21-Aug-2020 13:24:33 UTC] PHP Notice:  Trying to get property 'ID' of non-object in F:\laragon\www\ZFRS\wp-content\plugins\woo-advanced-product-size-chart\admin\class-size-chart-for-woocommerce-admin.php on line 226
    [21-Aug-2020 13:24:33 UTC] PHP Notice:  Trying to get property 'post_type' of non-object in F:\laragon\www\ZFRS\wp-content\plugins\woo-advanced-product-size-chart\admin\class-size-chart-for-woocommerce-admin.php on line 227

    WordPress version: 5.5
    WooCommerce version: 4.4.1
    Advanced Product Size Charts for WooCommerce Premium by theDotstore – 2.0.4
    PHP version: 7.4.8

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Notice – debug.log’ is closed to new replies.