|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Stephan18 Smarty n00b
Joined: 13 Dec 2015 Posts: 2
|
Posted: Sun Dec 13, 2015 8:13 pm Post subject: Using register_shutdown_function produces error |
|
|
Hello,
If you`re using an errorHandling with register_shutdown_function like this example:
Code: | register_shutdown_function(array($this, 'handleFatalError')); |
And this:
Code: | public function handleFatalError() {
$error = error_get_last();
if (!$error) return;
throw new SystemException();
exit;
} |
it`s run into an error:
Code: | Oops, an error occurred!
Error
filemtime(): stat failed for /var/www/vhosts/**/**/affiliate/acp/templates/templates_c/*.file.options.tpl.php |
Sure, i can ignore this error, but i handle all errors
* Parse Error
* Notes
Here`s an example how to fix it:
/smarty/sysplugins/smarty_resource.php on line 772:
Code: | $compiled->timestamp = @filemtime($compiled->filepath); |
Replace it with this:
Code: | if (is_file($compiled->filepath)) {
$compiled->timestamp = filemtime($compiled->filepath);
}
else {
$compiled->timestamp = 0;
} |
Greetings from Germany |
|
Back to top |
|
Stephan18 Smarty n00b
Joined: 13 Dec 2015 Posts: 2
|
Posted: Sun Dec 13, 2015 8:26 pm Post subject: |
|
|
Ok, sorry my misstake.
This error comes with V19. In the actual build 28 its fixed. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|