Skip to content

Smarty Debug triggers undefined array key warnings #1139

@jakoch

Description

@jakoch

Smarty v5.5.2 triggers the following warnings:

vendor/smarty/smarty/src/Debug.php:107
Undefined array key "compile_time"

vendor/smarty/smarty/src/Debug.php:130
Undefined array key "render_time"

The fix is to predefine the keys in $template_data array, e.g.

        if(!array_key_exists('render_time', $this->template_data[ $this->index ][ $key ])) {
            $this->template_data[ $this->index ][ $key ][ 'render_time' ] = 0;
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions