Title of image in posts and pages is 'Array'
Status: Beta
Brought to you by:
elijah_cornell
If you add a gallery image to a blog post and then view the post, hover your mouse over the image and you will see the pop-up title say 'Array'.
This happens because the following call assumes that resp['photo']['title'] returns a string.
$title = $this->_unhtmlentities($resp['photo']['title']);
My quick solution is to add a small check at the start of _unhtmlentities() such that if the input parameter is an array then it will assume the string to be the first element in the array, i.e.:
function _unhtmlentities($string) {
if (is_array($string))
{
$string = reset($string);
}
// replace numeric entities
$string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
...