Problem/Motivation

The filter throws a PHP Notice warning relating to the return value of the SoEmbedFilter->embed() method when

Steps to reproduce

Add the soembed filter on a text field with the soembed filter setup and view content. If you have PHP configured to display all errors you will get the PHP Notice warning.

Proposed resolution

The embed() function returns rendered HTML which is sandwiched between index 1 and 3 of the $match array.... it's not clear to me the purpose of wrapping the returned HTML output in those values.

Removing the $match[0] and $match[3] wrappers fix the issue and don't break the (already) rendered HTML output.

CommentFileSizeAuthor
#2 undefined-offset-3199585-1.patch467 bytescossovich

Comments

cossovich created an issue. See original summary.

cossovich’s picture

StatusFileSize
new467 bytes

Patch added with only the rendered HTML output returned from embed() method.

Webbeh’s picture

Status: Active » Needs review

Based on #2, for review?

Webbeh’s picture

Assigned: cossovich » Unassigned
ki’s picture

Status: Needs review » Closed (works as designed)

The wrapping characters are restored back to complete the original tags. In most case with ckeditor, they would be <p> and </p>. However, I've fixed the warning with ?? operator.

ki’s picture

Status: Closed (works as designed) » Fixed
ki’s picture

Status: Fixed » Closed (fixed)