getdave / Tanlinell

Boilerplate Wordpress theme for rapid development of new WP themes. Based on the great work of the _s ("Underscore") theme.
GNU General Public License v2.0
6 stars 2 forks source link

Meaningful error when calling tanlinell_get_post_thumb without WPThumb #185

Open nickwoodland opened 11 years ago

nickwoodland commented 11 years ago

The method tanlinell_get_post_thumb relies on the WPThumb plugin. Without the plugin installed, calls to this method throw the following error:

Notice: Undefined offset: 0 in /Users/nickwoodland/Sites/BJP/www.bjp-uk.com/wp-includes/media.php on line 440

This error gives no indication as to what's causing it. Add more informative error handling for this case.

getdave commented 10 years ago

@neilberry001 Do you have an ideas regarding this?

neilberry001 commented 10 years ago

I would like to see an example. I'm pretty confident that tanlinell_get_post_thumb is not dependent on a plugin. However, we can extend the error reporting for this function if so required by the use of WP_Error http://codex.wordpress.org/Class_Reference/WP_Error

Checking on empty params, returns...etc

getdave commented 10 years ago

@nickwoodland @neilberry001 Can you decide on a resolution for this? Add to the appropriate milestone and ensure it is resolved? Much appreciated

neilberry001 commented 10 years ago

I think we can close this.

We never use that function anymore in favour templates and responsive images.

Would probably be best to audit it properly though.

Without seeing an example of the error and no call on the function in current Tanlinell i'd say it was pretty safe to remove this function.

nickwoodland commented 10 years ago

@neilberry001 to confirm, do you want me to strip the function in question from plugin? Or leave it? want to get this issue resolved!