• Resolved prodcnd

    (@prodcnd)


    Hi,
    I have an error on line 36 of the file /plugin/init.php

    
    if ( $field_value !== '' ) {
      $field_value = json_decode( $field_value );
      if ( property_exists( $field_value, 'enableLightbox' ) ) {
        if ( $field_value->enableLightbox === false ) {
          return;
        }
      }
     }
    

    The var $field_value return Null
    Wordpres return :
    Warning: First parameter must either be an object or the name of an existing class in E:\WAMP\www\test-plugin\wp-content\plugins\simply-gallery-block\plugins\init.php on line 42

    The variable $field_value must be tested before your function with :

    
    if ($field_value !=null) {
                    if ( property_exists( $field_value, 'enableLightbox' ) ) {
                        if ( $field_value->enableLightbox === false ) {
                            return;
                        }
                    }
                }
    

    Could you update that?

    Thanks a lot

    • This topic was modified 3 months, 3 weeks ago by prodcnd.
    • This topic was modified 3 months, 3 weeks ago by Yui. Reason: formatting
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.