Teeny bug with 'Title text for like/unlike image'
-
Hi
Just discovered a small bug with the ‘Title text for like/unlike images’ entry in the settings page.
I’m only using this for ‘likes’ i dont want ‘unlike’ as an option so i only had “Like” in the field ‘Title text for like/unlike images’ – ie i didnt have anything seperated with a ‘/’.
The plugin does expect that to be there when rendering the page.
In wti_like_post_page you have the following:
// Check for title text. if empty then have the default value
if (empty($title_text)) {
$title_text_like = __(‘Like’, ‘wti-like-post’);
$title_text_unlike = __(‘Unlike’, ‘wti-like-post’);
} else {
$title_text = explode(‘/’, get_option(‘wti_like_post_title_text’));
$title_text_like = $title_text[0];
$title_text_unlike = $title_text[1];
}If the text in the settings page isn’t delimited with a ‘/’ then $title_text_unlike = $title_text[1]; wont exist and you get an offset error on the post page.
Just figured i should flag that so that either the settings page can be validated or the code can deal with text thats not delimited.
- The topic ‘Teeny bug with 'Title text for like/unlike image'’ is closed to new replies.