【发布时间】:2014-11-09 05:03:49
【问题描述】:
您好,我在我的 web 应用程序中遇到了这个通知,该应用程序在 godaddy 的子域上启动了 Yii 1.14,它使我的应用程序崩溃。
未定义的偏移量:0
/home/uname/public_html/some_dir/yii/framework/web/CUrlManager.php(656)
public function __construct($route,$pattern)
{
if(is_array($route))
{
foreach(array('urlSuffix', 'caseSensitive', 'defaultParams', 'matchValue', 'verb', 'parsingOnly') as $name)
{
if(isset($route[$name]))
$this->$name=$route[$name];
}
if(isset($route['pattern']))
$pattern=$route['pattern'];
$route=$route[0];
}
$this->route=trim($route,'/');
$tr2['/']=$tr['/']='\\/';
if(strpos($route,'<')!==false && preg_match_all('/<(\w+)>/',$route,$matches2))
{
foreach($matches2[1] as $name)
$this->references[$name]="<$name>";
}
$this->hasHostInfo=!strncasecmp($pattern,'http://',7) || !strncasecmp($pattern,'https://',8);
【问题讨论】:
-
显然
$route[0]没有设置 -
乔南:是的,但问题是这是来自 Yii 1.14 的核心代码,它在我的本地主机上运行没有问题
-
@Clément Malet 我不这么认为。
-
@HamzehAlDarawsheh 那么您必须提供有关您的问题的更多详细信息。我们所能做的就是没有设置
$route[0]。你希望它是什么?