cvs: smarty /libs Smarty.class.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1060859506@cvsserver> |
messju Thu Aug 14 07:11:46 2003 EDT
Modified files:
/smarty/libs Smarty.class.php
Log:
fixed typecasting for arrays in _parse_resource_name()
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.437 smarty/libs/Smarty.class.php:1.438
--- smarty/libs/Smarty.class.php:1.437 Wed Aug 13 12:37:12 2003
+++ smarty/libs/Smarty.class.php Thu Aug 14 07:11:46 2003
@@ -43,7 +43,7 @@
* @version 2.6.0-RC1-cvs
*/
-/* $Id: Smarty.class.php,v 1.437 2003/08/13 16:37:12 messju Exp $ */
+/* $Id: Smarty.class.php,v 1.438 2003/08/14 11:11:46 messju Exp $ */
/**
* DIR_SEP isn't used anymore, but third party apps might
@@ -1727,8 +1727,12 @@
if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $params['resource_name'])) {
// relative pathname to $params['resource_base_path']
// use the first directory where the file is found
- $_resource_base_path = isset($params['resource_base_path']) ? $params['resource_base_path'] : array($this->template_dir, '.');
- settype($_resource_base_path, 'array');
+ if (isset($params['resource_base_path'])) {
+ $_resource_base_path = (array)$params['resource_base_path'];
+ } else {
+ $_resource_base_path = (array)$this->template_dir;
+ $_resource_base_path[] = '.';
+ }
foreach ($_resource_base_path as $_curr_path) {
$_fullpath = $_curr_path . DIRECTORY_SEPARATOR . $params['resource_name'];
if (file_exists($_fullpath) && is_file($_fullpath)) {
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php