17/09/2010, 13:14:23
J'ai quand même un bug en allant sur mon site migré vers OVH.
On me dit ceci :
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /homez.116/monsite/www/monrepertoire_cmsms/lib/page.functions.php on line 1395
Voici les lignes du code concerné (fichier page.functions.php), j'avoue être incapable de trouver le "&" en trop ou '$' ou T_VARIABLE manquant par ici... :
if( !$matched )
{
// call modules to see if they can match the URL
foreach( $gCms->modules as $key => &$data )
{
if( !isset($data['installed']) || $data['installed'] == FALSE ) continue;
$module =& $data['object'];
$res = $module->IsValidRoute($page);
if( !is_array($res) ) continue;
$tmp = array('id'=>'cntnt01','action'=>'defaulturl',
'inline'=>0,'returnid'=>'','module'=>$key);
$tmp = array_merge($tmp,$res);
foreach( $tmp as $key => $value )
{
switch( $key )
{
case 'returnid':
case 'module':
case 'id':
case 'inline':
// do nothing.
break;
case 'action':
$_REQUEST['mact'] = $tmp['module'] . ',' . $tmp['id'] . ',' . $tmp['action'] . ',' . $tmp['inline'];
break;
default:
$_REQUEST[$tmp['id'].$key] = $value;
}
}
$page = $tmp['returnid'];
$smarty->id = $tmp['id'];
$matched = true;
}
}
// if noroute matched... grab the alias from the last /
if( ($pos = strrpos($page,'/')) !== FALSE && $matched == false )
{
$page = substr($page, $pos + 1);
}
// at this point we MUST have a valid page
if( empty($page) )
{
// maybe it's the home page.
$page = $contentops->GetDefaultContent();
}
return $page;
}
# vim:ts=4 sw=4 noet
?>
On me dit ceci :
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /homez.116/monsite/www/monrepertoire_cmsms/lib/page.functions.php on line 1395
Voici les lignes du code concerné (fichier page.functions.php), j'avoue être incapable de trouver le "&" en trop ou '$' ou T_VARIABLE manquant par ici... :
if( !$matched )
{
// call modules to see if they can match the URL
foreach( $gCms->modules as $key => &$data )
{
if( !isset($data['installed']) || $data['installed'] == FALSE ) continue;
$module =& $data['object'];
$res = $module->IsValidRoute($page);
if( !is_array($res) ) continue;
$tmp = array('id'=>'cntnt01','action'=>'defaulturl',
'inline'=>0,'returnid'=>'','module'=>$key);
$tmp = array_merge($tmp,$res);
foreach( $tmp as $key => $value )
{
switch( $key )
{
case 'returnid':
case 'module':
case 'id':
case 'inline':
// do nothing.
break;
case 'action':
$_REQUEST['mact'] = $tmp['module'] . ',' . $tmp['id'] . ',' . $tmp['action'] . ',' . $tmp['inline'];
break;
default:
$_REQUEST[$tmp['id'].$key] = $value;
}
}
$page = $tmp['returnid'];
$smarty->id = $tmp['id'];
$matched = true;
}
}
// if noroute matched... grab the alias from the last /
if( ($pos = strrpos($page,'/')) !== FALSE && $matched == false )
{
$page = substr($page, $pos + 1);
}
// at this point we MUST have a valid page
if( empty($page) )
{
// maybe it's the home page.
$page = $contentops->GetDefaultContent();
}
return $page;
}
# vim:ts=4 sw=4 noet
?>