Afficher un message
  #11  
Vieux   
Pitchoune (Hors ligne)
Administrateur
Pitchoune is on a distinguished road
 
Messages: 40
Date d'inscription: December 2005
Par défaut 26/02/2006 , 20h27


Autre bug survenu suite au bug précédent :

Code PHP:
WarningInvalid argument supplied for foreach() in /global.php(233) : eval()'d code on line 90 
Cette erreur survient après avoir renseigné le champ module à la main de la table template. Elle s'apparente au module dans style_fetch.

Code original du module :

Code PHP:
if (THIS_SCRIPT == 'portal_index')
{
 
$page_options_cache $page_options_cache["$PAGE_TITLE"];
 
$vbfp_perms $vbfp_perm_cache["$PAGE_TITLE"];
 
// on récupère l'id du style attribué à cette page
 
if ($page['styleid'] != 0)
 {
  
$styleid $page['styleid'];
 }
 
$module_in_page = array();
 
$template_in_page = array();
 
$module_name_array = array();
 
$special_in_page = array();
 if (
$pagecache_exp["$PAGE_TITLE"]["$styleid"]['expert'] == 1)
 {
  
define('EXPERT_MODE'1);
  
$PAGE_STYLEID $styleid;
  if (!empty(
$pagecache_exp["$PAGE_TITLE"]["$styleid"]['modules']))
  {
   foreach (
$pagecache_exp["$PAGE_TITLE"]["$styleid"]['modules'] AS $module_name)
   {
    if (
$vbfp_perms["$styleid"]["$module_name"]['canview'][$vbulletin->userinfo[usergroupid]] == 1)
    {
     
$module preg_replace('/^(.+?)(_\d+?|)$/''\\1'$module_name);
     if (!
in_array(trim($module), $module_in_page))
     {
      
$module_in_page[] = trim($module);
      
// les templates
      
foreach ($modulecache["$module"]['templates'] AS $template)
      {
       
$template_in_page[] = $template;
      }
      
// les templates autre
      
if ($modulecache["$module"]['othertemplates'] != '')
      {
       
$other_tmp explode(','$modulecache["$module"]['othertemplates']);
       foreach (
$other_tmp AS $other)
       {
        
$template_in_page[] = $other;
       }
      }
      
// les templates spéciaux
      
if ($modulecache["$module"]['specialtemplates'] != '')
      {
       
$special_tmp explode(','$modulecache["$module"]['specialtemplates']);
       foreach (
$special_tmp AS $special)
       {
        
$special_in_page["$module_name"][] = "'" trim($db->escape_string($special)) . "'";
       }
      }
     }
     
$module_name_array["$module_name"] = $module;
    }
   }
  }
 }
 else
 {
  if (
is_array($page['modules']))
  {
   
$PAGE_STYLEID 0;
   foreach (
$page['modules'] AS $colonne => $tmp1)
   {
    foreach (
$tmp1 as $module_name)
    {
     if (
$vbfp_perms[0]["$name"]['canview'][$vbulletin->userinfo[usergroupid]] == 1)
     {
      
$module preg_replace('/^(.+?)(_\d+?|)$/''\\1'$module_name);
      if (!
in_array(trim($module), $module_in_page))
      {
       
$module_in_page[] = trim($module);
       foreach (
$modulecache["$module"]['templates'] AS $template)
       {
        
$template_in_page[] = $template;
       }
       if (
$modulecache["$module"]['othertemplates'] != '')
       {
        
$other_tmp explode(','$modulecache["$module"]['othertemplates']);
        foreach (
$other_tmp AS $other)
        {
         
$template_in_page[] = $other;
        }
       }
       if (
$modulecache["$module"]['specialtemplates'] != '')
       {
        
$special_tmp explode(','$modulecache["$module"]['specialtemplates']);
        foreach (
$special_tmp AS $special)
        {
         
$special_in_page["$module_name"][] = "'" trim($db->escape_string($special)) . "'";
        }
       }
      }
      
$module_name_array["$module_name"] = $module;
     }
    }
   }
  }
 }
 
$globaltemplates array_merge($globaltemplates$template_in_page);
 unset(
$module_name);
 
// on recupère les options importantes de la page
 
if (is_array($page_options_cache["$PAGE_STYLEID"]['vbfp']))
 {
  foreach(
$page_options_cache["$PAGE_STYLEID"]['vbfp'] AS $varname => $value)
  {
   
$vbfp_options["$varname"] = $value;
  }
 }

La ligne 90 est la suivante :
Code PHP:
$template_in_page[] = $other
(deuxième apparition).

Je trouve pas la correction à part désinstaller et reinstaller le portail... Bug visible actuellement sur vb-fr.

Réponse avec citation
 
X vBulletin 3.8.11 Debug Information
  • Page Generation 0,01425 seconds
  • Memory Usage 1,322KB
  • Queries Executed 9 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_reputation
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • fetch_musername
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • showpost_complete