Support » Plugin: Instant Articles for WP » PHP error in Custom transformer rules textarea

  • locopetey

    (@locopetey)


    Hello!

    Seeing this error twice like below in the textarea when enabling Custom transformer rules

    Notice: Undefined index: double_encode in /var/app/current/wp-content/plugins/fb-instant-
    articles/settings/class-instant-articles-option.php on line 386
    Notice: Undefined index: double_encode in /var/app/current/wp-content/plugins/fb-instant-
    articles/settings/class-instant-articles-option.php on line 386

    Version 3.0.1

    https://wordpress.org/plugins/fb-instant-articles/

Viewing 2 replies - 1 through 2 (of 2 total)
  • locopetey

    (@locopetey)

    also, when WP debug is on, we’re seeing a TON of stuff populate the textarea.

    Jer Clarke

    (@jeremyclarke)

    +1 fix this ASAP it’s extremely simple. The code at fault is here:

    echo $args[ 'double_encode' ] ? htmlspecialchars( $option_value ) : esc_html( $option_value ); ?></textarea>

    Obviously there are cases where that array key doesn’t exist. Either ensure it exists by initializing the array at the top of the universal_render_handler() method with all the expected keys, or validate each key as you go.

    Also: Are you not developing this plugin with WP_DEBUG enabled? You should have seen this error yourselves:

    https://codex.wordpress.org/Debugging_in_WordPress

    FWIW this seems to apply to all textareas not just transformations. I see it in the analytics embed code textarea.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP error in Custom transformer rules textarea’ is closed to new replies.