Les avertissements suivants se sont produits :
Warning [2] Undefined array key 0 - Line: 1640 - File: showthread.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 1640 errorHandler->error_callback
/showthread.php 915 buildtree




Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
[Résolu] OVH, base de données et fichier config.php !
#5
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
?>


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)