Title: php 8 support
Last modified: November 12, 2022

---

# php 8 support

 *  [gregoriogalli](https://wordpress.org/support/users/gregoriogalli/)
 * (@gregoriogalli)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-8-support-35/)
 * It is php 8 supported? If not, are u planning an update with support for this
   version? Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-8-support-35/#post-16191876)
 * 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.
 *  Thread Starter [gregoriogalli](https://wordpress.org/support/users/gregoriogalli/)
 * (@gregoriogalli)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-8-support-35/#post-16192554)
 * 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 90
 * The same in error log
 *  Plugin Author [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-8-support-35/#post-16209784)
 * 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_).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php 8 support’ is closed to new replies.

 * ![](https://ps.w.org/photonic/assets/icon.svg?rev=1972449)
 * [Photonic Gallery & Lightbox for Flickr, SmugMug & Others](https://wordpress.org/plugins/photonic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/photonic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/photonic/)
 * [Active Topics](https://wordpress.org/support/plugin/photonic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photonic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photonic/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/php-8-support-35/#post-16209784)
 * Status: not a support question