• Resolved connectisl

    (@connectisl)


    Hi,

    We recently tried to migrate a site to PHP 8.0. However, when we did this, we encountered a fatal error which we think is coming from your plugin.

    PHP Fatal error:  Uncaught TypeError: closedir(): Argument #1 ($dir_handle) must be of type resource or null, bool given in /var/www/wp-content/plugins/simple-lightbox/includes/class.utilities.php:1319
    
    Stack trace:
    
    #0 /var/www/wp-content/plugins/simple-lightbox/includes/class.utilities.php(1319): closedir(false)
    
    #1 /var/www/wp-content/plugins/simple-lightbox/includes/class.base.php(237): SLB_Utilities->get_plugin_base_file()
    
    #2 /var/www/wp-content/plugins/simple-lightbox/includes/class.options.php(54): SLB_Base->_hooks()
    
    #3 /var/www/wp-content/plugins/simple-lightbox/includes/class.base.php(155): SLB_Options->_hooks()
    
    #4 /var/www/wp-content/plugins/simple-lightbox/includes/class.field_collection.php(73): SLB_Base->_init()
    
    #5 /var/www/wp-content/plugins/simple-lightbox/includes/class.base.php(121): SLB_Field_Collection->_init()
    
    #6 /var/www/wp-content/plugins/simple-lightbox/includes/class.field_base.php(157): SLB_Base->__construct()
    
    #7 /var/www/wp-content/plugins/simple-lightbox/includes/class.field_collection.php(66): SLB_Field_Base->__construct(Array)
    
    #8 /var/www/wp-content/plugins/simple-lightbox/includes/class.options.php(49): SLB_Field_Collection->__construct(Array)
    
    #9 /var/www/wp-content/plugins/simple-lightbox/includes/class.base.php(197): SLB_Options->__construct()
    
    #10 /var/www/wp-content/plugins/simple-lightbox/controller.php(360): SLB_Base->_set_options(Array)
    
    #11 /var/www/wp-content/plugins/simple-lightbox/includes/class.base.php(147): SLB_Lightbox->_options()
    
    #12 /var/www/wp-content/plugins/simple-lightbox/controller.php(167): SLB_Base->_init()
    
    #13 /var/www/wp-content/plugins/simple-lightbox/includes/class.base.php(121): SLB_Lightbox->_init()
    
    #14 /var/www/wp-content/plugins/simple-lightbox/controller.php(155): SLB_Base->__construct()
    
    #15 /var/www/wp-content/plugins/simple-lightbox/load.php(37): SLB_Lightbox->__construct()
    
    #16 /var/www/wp-content/plugins/simple-lightbox/main.php(43): require_once('/data/projects/...')
    
    #17 /var/www/wp-includes/class-wp-hook.php(307): slb_init('')
    
    #18 /var/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    
    #19 /var/www/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    
    #20 /var/www/wp-settings.php(598): do_action('init')
    
    #21 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1317): require('/data/projects/...')
    
    #22 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1235): WP_CLI\Runner->load_wordpress()
    
    #23 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    
    #24 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
    
    #25 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    
    #26 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
    
    #27 /usr/local/bin/wp(4): include('phar:///usr/loc...')
    
    #28 {main}
    
      thrown in /var/www/wp-content/plugins/simple-lightbox/includes/class.utilities.php on line 1319
    
    Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

    If we switch back to PHP 7, we no longer get the issue. Does your plugin support PHP 8.0?

    Any help much appreciated.

    Thanks,

    Chris

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8.0 Support’ is closed to new replies.