Přechod na Nette 2.4, User Deprecated: Replace literal AND with constant(‚AND‘)
Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
- ludek
- Člen | 83
Zdravím,
u jednoho projektu se po upgrade Nette 2.3.10 → 2.4 objevuje chyba
User Deprecated: Replace literal AND with constant('AND')
CallStack neobsahuje nic ode mě (vizte prosím níže).
- Přidám, do bootstrapu:
bootstrap: error_reporting(~E_USER_DEPRECATED);
Chyba samozřejmě zmizí, aplikace je plně funkční. - Opět zakomentuju, obnovím, chyba už se znovu neobjeví, dokud…
- Smažu cache, chyba je zpět.
Tzn. po vytvoření cache už to nechybuje. Nevíte prosím čím by to mohlo být?
Source file
File: ...\latte\latte\src\Latte\Compiler\PhpWriter.php:191
191: trigger_error("Replace literal $val with constant('$val')", E_USER_DEPRECATED);
Call stack
...\latte\latte\src\Latte\Compiler\PhpWriter.php:191 source trigger_error(arguments)
...\latte\latte\src\Latte\Compiler\PhpWriter.php:162 source Latte\PhpWriter->validateTokens(arguments)
...\latte\latte\src\Latte\Compiler\PhpWriter.php:123 source Latte\PhpWriter->preprocess(arguments)
...\latte\latte\src\Latte\Compiler\PhpWriter.php:80 source Latte\PhpWriter->formatArgs() inner-code Latte\PhpWriter->Latte\{closure}(arguments)
...\latte\latte\src\Latte\Compiler\PhpWriter.php:95 source preg_replace_callback(arguments)
...\vendor\latte\latte\src\Latte\Macros\CoreMacros.php:136 source Latte\PhpWriter->write(arguments) inner-code Latte\Macros\CoreMacros->macroIf(arguments)
...\vendor\latte\latte\src\Latte\Macros\MacroSet.php:145 source call_user_func(arguments)
...\vendor\latte\latte\src\Latte\Macros\MacroSet.php:107 source Latte\Macros\MacroSet->compile(arguments)
...\vendor\latte\latte\src\Latte\Compiler\Compiler.php:777 source Latte\Macros\MacroSet->nodeOpened(arguments)
...\vendor\latte\latte\src\Latte\Compiler\Compiler.php:530 source Latte\Compiler->expandMacro(arguments)
...\vendor\latte\latte\src\Latte\Compiler\Compiler.php:337 source Latte\Compiler->openMacro(arguments)
...\vendor\latte\latte\src\Latte\Compiler\Compiler.php:140 source Latte\Compiler->processMacroTag(arguments)
...\vendor\latte\latte\src\Latte\Engine.php:118 source Latte\Compiler->compile(arguments)
...\vendor\latte\latte\src\Latte\Engine.php:185 source Latte\Engine->compile(arguments)
...\vendor\latte\latte\src\Latte\Engine.php:94 source Latte\Engine->loadTemplate(arguments)
...\vendor\latte\latte\src\Latte\Engine.php:70 source Latte\Engine->createTemplate(arguments)
...\src\Bridges\ApplicationLatte\Template.php:52 source Latte\Engine->render(arguments)
...\src\Application\Responses\TextResponse.php:49 source Nette\Bridges\ApplicationLatte\Template->render()
...\nette\application\src\Application\Application.php:157 source Nette\Application\Responses\TextResponse->send(arguments)
...\nette\application\src\Application\Application.php:83 source Nette\Application\Application->processRequest(arguments)
C:\web\www\test.cz\www\index.php:4 source Nette\Application\Application->run()
1: <?php
2:
3: $container = require __DIR__ . '/../app/bootstrap.php';
4: $container->getByType('Nette\Application\Application')->run();
PHP 7.0.8, Apache/2.4.18 (Win32), Tracy 2.4.2, Nette Framework 2.4
Editoval ludek (31. 8. 2016 14:13)