Support

Account

Home Forums Bug Reports Stack trace for index in array unknow

Solved

Stack trace for index in array unknow

  • Hi everybody,

    It’s just a PHP notice, but they are lot of call on this fonction.
    I see in my debug.log this error, :
    [16-Aug-2018 08:43:32 UTC] PHP Notice: Undefined index: readonly in C:\wamp64\www\retail-portal-wordpress\wp-content\plugins\acf-qtranslate\src\acf_5\fields\text.php on line 100

    You can Fix this stack trace with this code:
    File: text.php & textarea.php
    line: 89 to 104
    Function: render_field($field)
    Just add if with array_key_value

    Code Fix:
    // populate atts
    $atts = array();
    foreach( $o as $k ) {
    //if(array_key_exists($k,$field)){
    $atts[ $k ] = $field[ $k ];
    //}
    }

    // special atts
    foreach( $s as $k ) {
    //if(array_key_exists($k,$field)){
    if( $field[ $k ] ) {
    $atts[ $k ] = $k;
    }
    //}
    }

    I see a boost of performance with wp_debug at on.

  • The error is happening in the acf-qtranslate, you should probably contact them about this error.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Stack trace for index in array unknow’ is closed to new replies.