Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index when using eval and debugging #266

Closed
kkFelix opened this issue Aug 8, 2016 · 3 comments
Closed

Undefined index when using eval and debugging #266

kkFelix opened this issue Aug 8, 2016 · 3 comments

Comments

@kkFelix
Copy link

kkFelix commented Aug 8, 2016

Minimal example with the current 3.1.30 release:

smarty.php:

<?php
error_reporting(E_ALL);
ini_set('display_errors',1);

require_once 'vendor/autoload.php';

$s = new Smarty();
$s->setErrorReporting(E_ALL);
$s->setDebugging(true);
$s->setTemplateDir(dirname(__FILE__))
  ->setCompileDir(dirname(__FILE__))
  ->assign('test', '{$smarty.now}')
  ->display('smarty.tpl');

smarty.tpl:

{eval var=$test}

Output:

1470667559
Notice: Undefined index: start_time in vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php on line 147

Notice: Undefined index: start_template_time in vendor/smarty/smarty/libs/sysplugins/smarty_internal_debug.php on line 73
@uwetews
Copy link
Contributor

uwetews commented Aug 13, 2016

The fix is now in the master branch

@uwetews uwetews closed this as completed Aug 13, 2016
@guckstift
Copy link

guckstift commented May 22, 2017

Sorry, this didn't fix it. Line 73 in smarty_internal_debug.php:

Notice: Undefined index: start_template_time

Version: 3.1.31

@wullix
Copy link

wullix commented Apr 16, 2020

still not resolved on 3.1.34? I have again this bug if activating $smarty->debugging=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants