• wpduder

    (@wpduder)


    I get this error on my site from this plugin:

    
    [12-Apr-2020 02:02:25 UTC] PHP Notice:  Trying to get property 'ID' of non-object in /data/mytestsite.com/wp-content/plugins/wp-meta-and-date-remover/wp-meta-and-date-remover.php on line 207
    [12-Apr-2020 02:02:25 UTC] PHP Stack trace:
    [12-Apr-2020 02:02:25 UTC] PHP   1. {main}() /data/mytestsite.com/index.php:0
    [12-Apr-2020 02:02:25 UTC] PHP   2. require() /data/mytestsite.com/index.php:17
    [12-Apr-2020 02:02:25 UTC] PHP   3. require_once() /data/mytestsite.com/wp-blog-header.php:19
    [12-Apr-2020 02:02:25 UTC] PHP   4. include() /data/mytestsite.com/wp-includes/template-loader.php:98
    [12-Apr-2020 02:02:25 UTC] PHP   5. get_header() /data/mytestsite.com/wp-content/themes/porto/404.php:1
    [12-Apr-2020 02:02:25 UTC] PHP   6. locate_template() /data/mytestsite.com/wp-includes/general-template.php:41
    [12-Apr-2020 02:02:25 UTC] PHP   7. load_template() /data/mytestsite.com/wp-includes/template.php:671
    [12-Apr-2020 02:02:25 UTC] PHP   8. require_once() /data/mytestsite.com/wp-includes/template.php:722
    [12-Apr-2020 02:02:25 UTC] PHP   9. get_template_part() /data/mytestsite.com/wp-content/themes/porto/header.php:10
    [12-Apr-2020 02:02:25 UTC] PHP  10. locate_template() /data/mytestsite.com/wp-includes/general-template.php:168
    [12-Apr-2020 02:02:25 UTC] PHP  11. load_template() /data/mytestsite.com/wp-includes/template.php:671
    [12-Apr-2020 02:02:25 UTC] PHP  12. require() /data/mytestsite.com/wp-includes/template.php:724
    [12-Apr-2020 02:02:25 UTC] PHP  13. wp_head() /data/mytestsite.com/wp-content/themes/porto/head.php:37
    [12-Apr-2020 02:02:25 UTC] PHP  14. do_action() /data/mytestsite.com/wp-includes/general-template.php:2879
    [12-Apr-2020 02:02:25 UTC] PHP  15. WP_Hook->do_action() /data/mytestsite.com/wp-includes/plugin.php:478
    [12-Apr-2020 02:02:25 UTC] PHP  16. WP_Hook->apply_filters() /data/mytestsite.com/wp-includes/class-wp-hook.php:312
    [12-Apr-2020 02:02:25 UTC] PHP  17. wpmdr_css_filter_option() /data/mytestsite.com/wp-includes/class-wp-hook.php:288
    
    • This topic was modified 4 years ago by wpduder.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter wpduder

    (@wpduder)

    The fix is to add these lines:

    
    Line 134:
    if(!is_object($post) || !property_exists($post,'ID')) return;
    
    Line 183:
    if(!is_object($post) || !property_exists($post,'ID')) return;
    
    Line 210:
    if(!is_object($post) || !property_exists($post,'ID')) return;
    

    I get this error, is the solution the same?

    Exception: NoDecodeDelegateForThisImageFormat `/var/www/vhosts/…./httpdocs/wp-content/uploads/2018/10/friking-c.png’ @ error/constitute.c/ReadImage/544
    #0 /var/www/vhosts/……/httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(4862): Imagick->__construct(‘/var/www/vhosts…’)
    #1 /var/www/vhosts/…/httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(4984): Cpdf->addImagePngAlpha(‘/var/www/vhosts…’, 57.442913385827, 736.29354330709, 216, 76.5, 3)
    #2 /var/www/vhosts/…./httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Adapter/CPDF.php(864): Cpdf->addPngFromFile(‘/var/www/vhosts…’, 57.442913385827, 736.29354330709, 216, 76.5)
    #3 /var/www/vhosts/…/httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer/Image.php(110): Dompdf\Adapter\CPDF->image(‘/var/www/vhosts…’, 57.442913385827, 29.096456692913, 216, 76.5, ‘normal’)
    #4 /var/www/vhosts/…/httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(293): Dompdf\Renderer\Image->render(Object(Dompdf\FrameDecorator\Image))
    #5 /var/www/vhosts/…../httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(127): Dompdf\Renderer->_render_frame(‘image’, Object(Dompdf\FrameDecorator\Image))

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Notice: Trying to get property ‘ID’ of non-object’ is closed to new replies.