diff options
| author | Atsushi Matsuo <famlog@gmail.com> | 2024-08-29 06:09:34 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-28 23:09:34 +0200 |
| commit | 30c6ee64ab80154539c25ff8b8285aa5d568babf (patch) | |
| tree | a4ac1be855b517041bdcd490e2edb1cc56e738b5 /src | |
| parent | fd90f7eac969d998736edbf12dadf04c64471b0a (diff) | |
| download | smarty-30c6ee64ab80154539c25ff8b8285aa5d568babf.tar.gz smarty-30c6ee64ab80154539c25ff8b8285aa5d568babf.tar.bz2 smarty-30c6ee64ab80154539c25ff8b8285aa5d568babf.zip | |
Fix an issue that preventing the use of "extends:" to define the inheritance tree on Windows (#1056)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Resource/ExtendsPlugin.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Resource/ExtendsPlugin.php b/src/Resource/ExtendsPlugin.php index acce54e2..0f9c9de2 100644 --- a/src/Resource/ExtendsPlugin.php +++ b/src/Resource/ExtendsPlugin.php @@ -93,7 +93,11 @@ class ExtendsPlugin extends BasePlugin */ public function getBasename(Source $source) { - return str_replace(':', '.', basename($source->getResourceName())); + $search = array(':'); + if (\Smarty\Smarty::$_IS_WINDOWS) { + $search = array(':', '|'); + } + return str_replace($search, '.', basename($source->getResourceName())); } /* |
