|
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 |
jaycode Smarty n00b
Joined: 15 Jan 2015 Posts: 2
|
Posted: Thu Jan 15, 2015 4:17 pm Post subject: Bug in Smarty when used with vfsStream and where to fix. |
|
|
When using vfsStream for PHP Unit testing with smarty, loading a template will cause this error:
PHPUnit_Util_ErrorHandler::handleError(2, 'fopen(vfs:\\roo...', 'D:\htdocs\...', 42, Array)
To fix this, below is the hack:
smarty_internal_resource_file.php line 30:
$source->filepath = str_replace(':\\\\', '://', $source->filepath);
Please include this change in future smarty version. |
|
Back to top |
|
jaycode Smarty n00b
Joined: 15 Jan 2015 Posts: 2
|
Posted: Thu Jan 15, 2015 4:19 pm Post subject: |
|
|
This only happen in Windows, by the way, and caused by DIRECTORY_SEPARATOR in Windows using \ instead of /. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Jan 15, 2015 4:22 pm Post subject: |
|
|
Use forward slashes as directory separators.
No need for any hacks. |
|
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
|