Fix second callback when filtering caption text for shortcode, props SergeyBiryukov, fixes #20369

git-svn-id: http://svn.automattic.com/wordpress/trunk@20376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2012-04-06 17:38:49 +00:00
parent a64c918e67
commit 2441cb0cae
1 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@ function _cleanup_image_add_caption($str) {
// Private, preg_replace callback used in image_add_caption()
function _cleanup_image_add_caption2($str) {
return str_replace( "'", ''', $str );
return ( isset( $str[0] ) ) ? str_replace( "'", ''', $str[0] ) : '';
}
/**