php 8 support
-
It is php 8 supported? If not, are u planning an update with support for this version? Thank you!
-
I have not tested it with PHP 8. Based on what I have read, I don’t think there should be any major issues, but I will not know until I have tested. I plan on doing the compatibility, but I don’t have a timeframe for when.
I made a test. I have two web sites with photonic. The set of plug-ins is nearly the same. When I switch to php 8 the gallery stop working in one only of the two (ociogiulivo.com) and I have the following error.
I cannot find the difference that cause the following error. The other web site (www.vininaturaliditoscana.com) work regularly. I activated display_errors.Directly on the page where the gallery is:
Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /home/ngoonet/ociogiulivo.com/wp-content/plugins/photonic/Modules/Native.php:90 Stack trace: #0 [internal function]: trim() #1 /home/ngoonet/ociogiulivo.com/wp-content/plugins/photonic/Modules/Native.php(90): array_map() #2 /home/ngoonet/ociogiulivo.com/wp-content/plugins/photonic/Core/Gallery.php(76): Photonic_Plugin\Modules\Native->get_gallery_images() #3 /home/ngoonet/ociogiulivo.com/wp-content/plugins/photonic/Core/Photonic.php(792): Photonic_Plugin\Core\Gallery->get_contents() #4 /home/ngoonet/ociogiulivo.com/wp-content/plugins/photonic/Core/Photonic.php(660): Photonic_Plugin\Core\Photonic->get_gallery_images() #5 /home/ngoonet/ociogiulivo.com/wp-includes/class-wp-hook.php(310): Photonic_Plugin\Core\Photonic->modify_gallery() #6 /home/ngoonet/ociogiulivo.com/wp-includes/plugin.php(205): WP_Hook->apply_filters() #7 /home/ngoonet/ociogiulivo.com/wp-includes/media.php(2406): apply_filters() #8 /home/ngoonet/ociogiulivo.com/wp-includes/widgets/class-wp-widget-media-gallery.php(129): gallery_shortcode() #9 /home/ngoonet/ociogiulivo.com/wp-includes/widgets/class-wp-widget-media.php(253): WP_Widget_Media_Gallery->render_media() #10 /home/ngoonet/ociogiulivo.com/wp-includes/class-wp-widget.php(394): WP_Widget_Media->widget() #11 /home/ngoonet/ociogiulivo.com/wp-includes/widgets.php(835): WP_Widget->display_callback() #12 /home/ngoonet/ociogiulivo.com/wp-content/themes/ashe-pro-premium/templates/sidebars/sidebar-right.php(15): dynamic_sidebar() #13 /home/ngoonet/ociogiulivo.com/wp-includes/template.php(785): require(‘/home/ngoonet/o…’) #14 /home/ngoonet/ociogiulivo.com/wp-includes/template.php(718): load_template() #15 /home/ngoonet/ociogiulivo.com/wp-includes/general-template.php(204): locate_template() #16 /home/ngoonet/ociogiulivo.com/wp-content/themes/ashe-pro-premium/page.php(98): get_template_part() #17 /home/ngoonet/ociogiulivo.com/wp-includes/template-loader.php(106): include(‘/home/ngoonet/o…’) #18 /home/ngoonet/ociogiulivo.com/wp-blog-header.php(19): require_once(‘/home/ngoonet/o…’) #19 /home/ngoonet/ociogiulivo.com/index.php(17): require(‘/home/ngoonet/o…’) #20 {main} thrown in /home/ngoonet/ociogiulivo.com/wp-content/plugins/photonic/Modules/Native.php on line 90The same in error log
Interesting – I think this error is coming due to a conflict with a different plugin. You might have a separate plugin that handles gallery functionality (or this may be built into your theme). It is possible that such functionality is changing the parameters of the shortcode to arrays, which is why the error is showing up.
You can try using a different shortcode for Photonic galleries (via Photonic → Settings → Generic Options → Generic Settings → Custom Shortcode). For example, you could use something like
photonic. Then instead of your gallery being invoked by this:[gallery ids="..."]you would have this:
[photonic ids="..."]Of course, you would have to change all your existing galleries, but that is easy via the shortcode replacement (Photonic → Shortcode Replacement).
The topic ‘php 8 support’ is closed to new replies.