-
Notifications
You must be signed in to change notification settings - Fork 29
Check before using wpthumb() #81
Comments
@jgalea I am not sure if I understand - do you have the WP Thumb plugin in two places on your site? If so, whatever is including it should do the check if it already exists, not WP Thumb. If you |
@joehoyle Hi, I am working with jgalea. However, our plugin is being loaded prior to any potential WPThumb installations. Thus, we are unable to prevent the redeclare error. Can WPThumb be adjusted to check if any other plugins might already have declared WPThumb ? |
@mekku93 Ahh I see, is it possible to do this check/load on the |
@joehoyle Thanks for the quick reply. |
@mekku93 that's very odd - as it looks like this is conflicting with the plugin WP Thumb. I don't want to add anything to WP Thumb without understanding the problem better - as this should work. |
@joehoyle I know, right ? When I comment the Although, the error is being raised on the |
@mekku93 can you check that the version of the plugin in |
@joehoyle It's the latest one, freshly downloaded from the WP repository. |
Hi @jgalea , I can not do much more debugging here without seeing the reproducible code, so I am not sure what other help I can offer. I think we agree that this should not be happening, so I suspect an edge case. In might just be a case of you hammering at it to track down how this is happening. Thanks |
Is this related? #83 |
I think there should be a check before declaring wpthumb(), to check that it's not already been called by a plugin using the WP Thumb class.
In my plugin I am checking for existing of the class before including it:
See error below:
Plugin could not be activated because it triggered a fatal error.
Fatal error: Cannot redeclare wpthumb() (previously declared in /home/wprss/public_html/wp-content/plugins/wp-rss-excerpts-thumbnails/includes/libraries/WPThumb/wpthumb.php:569) in /home/wprss/public_html/wp-content/plugins/wp-thumb/wpthumb.php on line 566
The text was updated successfully, but these errors were encountered: