@@ -138,7 +138,7 @@ public function twigEscapeStrategy($templateName)
138138
139139 if ($ templatePath ) {
140140 $ themePath = realpath ($ this ->getPico ()->getThemesDir () . $ this ->getPico ()->getTheme ()) . '/ ' ;
141- if (substr ($ templatePath , 0 , strlen ($ themePath )) === $ themePath ) {
141+ if (substr_compare ($ templatePath , $ themePath , 0 , strlen ($ themePath )) === 0 ) {
142142 $ themeApiVersion = $ this ->getPico ()->getThemeApiVersion ();
143143 return ($ themeApiVersion >= PicoDeprecated::API_VERSION_3 ) ? $ escapeStrategy : false ;
144144 }
@@ -167,7 +167,7 @@ protected function getPluginFromPath($path)
167167 {
168168 $ plugins = $ this ->getPico ()->getPlugins ();
169169 foreach ($ this ->pluginPaths as $ pluginName => $ pluginPath ) {
170- if ($ pluginPath && (substr ($ path , 0 , strlen ($ pluginPath )) === $ pluginPath )) {
170+ if ($ pluginPath && (substr_compare ($ path , $ pluginPath , 0 , strlen ($ pluginPath )) === 0 )) {
171171 return $ plugins [$ pluginName ];
172172 }
173173 }
@@ -190,7 +190,7 @@ protected function getPluginFromPath($path)
190190
191191 $ this ->pluginPaths [$ pluginName ] = $ pluginPath ;
192192
193- if ($ pluginPath && (substr ($ path , 0 , strlen ($ pluginPath )) === $ pluginPath )) {
193+ if ($ pluginPath && (substr_compare ($ path , $ pluginPath , 0 , strlen ($ pluginPath )) === 0 )) {
194194 return $ plugins [$ pluginName ];
195195 }
196196 }
0 commit comments