• Resolved BackuPs

    (@backups)


    Hi

    Please change this code on line 1231 in taxonomy_functions.php to this

    if(isset($taxonomy) && is_array($geodir_taxonomies) && in_array($taxonomy,$geodir_taxonomies)){

    It can throw notification errors when themes have their own custom post types.

    You need to check if the string is a array and or not empty !

    regards !

    https://www.ads-software.com/plugins/geodirectory/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Stiofan

    (@stiofansisland)

    Hello,

    I have had a look at the line in question
    if(isset($taxonomy) && in_array($taxonomy,$geodir_taxonomies)){

    that functions is calling our own taxonomies which will never be empty if u are actually using GD, it has nothing to do with the theme having other taxonomies, however on the off chance u install GD with the intent to not use it i will ad a check for it ??

    Thanks,

    Stiofan

    Thread Starter BackuPs

    (@backups)

    Well somehow i get there and it is empty and the fix is easy just change the code and return.

    Why i get there or what is causing it is unknow i only see the error and i think its because of a filter calling the get_the_excerpt

    it would be nice if you just add the extra statement it does not harm at all checking for it.

    So thank you for adding it.

    Thread Starter BackuPs

    (@backups)

    btw it happens in a wpms when switching blog_ids pulling blog posts from other subsites which are not running your plugin.

    Plugin Author Stiofan

    (@stiofansisland)

    i did add an extra check, the line is now…

    if(isset($taxonomy) && !empty($geodir_taxonomies) && in_array($taxonomy,$geodir_taxonomies)){

    and if your switching blog_id then it’s gona be checking the wrong blog for the taxonomies.

    Pulling posts from other blogs is not standard, we can’t be expected to check for not standard WP code that will cause errors ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Please change this code’ is closed to new replies.