Title: Bug in php function
Last modified: July 25, 2021

---

# Bug in php function

 *  Resolved [Angel Hess](https://wordpress.org/support/users/akissz/)
 * (@akissz)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/bug-in-php-function/)
 * There seems to be a bug in function add_media_categories between lines 115 and
   139 in file photographers-galleries.php
    The bug disables or removes all theme
   customizer html/php so the customizer is not visible. Are you able to reproduce
   this?

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

 *  Plugin Author [aurelienpierre](https://wordpress.org/support/users/aurelienpierre/)
 * (@aurelienpierre)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14698615)
 * What is the theme customizer ?
 *  Thread Starter [Angel Hess](https://wordpress.org/support/users/akissz/)
 * (@akissz)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14700494)
 * Customizer is a core main feature in all wordpress. Its been around since version
   3.4, or since June 2012… Started 9 years ago.
 *  Plugin Author [aurelienpierre](https://wordpress.org/support/users/aurelienpierre/)
 * (@aurelienpierre)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14701284)
 * Ok, I tested the customizer on a couple of sites, they behave properly. What 
   makes you think this function could be the culprit ?
 *  Thread Starter [Angel Hess](https://wordpress.org/support/users/akissz/)
 * (@akissz)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14708474)
 * I put the plugin through hard tests. I was testing 500 plugins and themes over
   the past few weeks and for some reason that section of your code or some other
   part of your code intermittently made problems with the customizer. I tried for
   5 hours yesterday to try and find a pattern and there was not a pattern besides
   when your plugin is active. Your plugin functions ok on a new fresh install and
   new database. But that’s not saying the code is bug free. I did find one strange
   pattern. If I rename the theme directories and reactivate, that seemed to help.
   I also copied a 100% bugfree theme into a directory that was causing the issue
   and the customizer disappeared again but there was zero connection to the bug
   and the directory. I had no other similar issue with the other 500 plugins/themes.
   So its possible there is a bug in your code, but maybe not.
 *  Plugin Author [aurelienpierre](https://wordpress.org/support/users/aurelienpierre/)
 * (@aurelienpierre)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14710790)
 * I did a test and it seems that the functions between lines 109 and 153 are not
   needed anymore, WordPress automatically adds the metaboxes to the media GUI for
   all taxinomies.
 * I will remove them and post an update, then we will see…
 *  Plugin Author [aurelienpierre](https://wordpress.org/support/users/aurelienpierre/)
 * (@aurelienpierre)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14710869)
 * Can you download [https://github.com/aurelienpierre/wp-photographers-galleries/releases/tag/1.0.3](https://github.com/aurelienpierre/wp-photographers-galleries/releases/tag/1.0.3)
   and report ? If that behaves well, I will push the change in WP extensions repository.
 *  Plugin Author [aurelienpierre](https://wordpress.org/support/users/aurelienpierre/)
 * (@aurelienpierre)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14749209)
 * [@akissz](https://wordpress.org/support/users/akissz/) Can you check if the latest
   update fixed it ?
 *  Plugin Author [aurelienpierre](https://wordpress.org/support/users/aurelienpierre/)
 * (@aurelienpierre)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14914542)
 * Dead topic, no answer.

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

The topic ‘Bug in php function’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/photographers-galleries_765e5a.svg)
 * [Photographers galleries](https://wordpress.org/plugins/photographers-galleries/)
 * [Support Threads](https://wordpress.org/support/plugin/photographers-galleries/)
 * [Active Topics](https://wordpress.org/support/plugin/photographers-galleries/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photographers-galleries/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photographers-galleries/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [aurelienpierre](https://wordpress.org/support/users/aurelienpierre/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/bug-in-php-function/#post-14914542)
 * Status: resolved