fairthy
Messages postés8Date d'inscriptionjeudi 23 mars 2006StatutMembreDernière intervention25 mai 2011
-
23 mai 2011 à 14:07
Bobshit75
Messages postés29Date d'inscriptionlundi 28 février 2011StatutMembreDernière intervention13 juillet 2011
-
24 mai 2011 à 10:22
Bonjour à tous et toutes,
bon voilà j'ai un soucis avec un code et je trouve pas l'erreur. j'utiliser dolibarr et je n'arrive plus à avoir accès à mes modules. j'ai l'erreur suivant: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homez.xxx/nomdusite/www/dolibarr/htdocs/includes/modules/modBelgium.class.php on line 34
j'ai été voir le code et je trouve pas ou ça pose problème. le voici:
<?php
/* Copyright (C) 2009-2010 Laurent Léonard <laurent@open-minds.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/includes/modules/modBelgium.class.php
* \ingroup belgium
* \brief Description and activation file for module Belgium.
* \version 0.1.1
*/
/**
* \class modBelgium
* \brief Description and activation class for module Belgium.
*/
class modBelgium extends DolibarrModules
{
public $boxes;
public $config_page_url;
public $const;
public $const_name;
public $db;
public $depends;
public $description;
public $dirs;
public $family;
public $langfiles;
public $menu;
public $name;
public $need_dolibarr_version;
public $numero;
public $phpmin;
public $picto;
public $requiredby;
public $rights;
public $rights_class;
public $special;
public $style_sheet;
public $version;
cs_47
Messages postés197Date d'inscriptionmardi 20 janvier 2004StatutMembreDernière intervention20 février 20131 23 mai 2011 à 18:14
Bonsoir,
La seule fois où j'ai vu ce message d'erreur, c'est en utilisant du code php5 sur du php4 (la visibilité d'une variable public, private, protected est arrivée avec php5)
Bobshit75
Messages postés29Date d'inscriptionlundi 28 février 2011StatutMembreDernière intervention13 juillet 2011 24 mai 2011 à 10:19
Essaye ça à la place de toutes tes déclarations de variables :
<?php
public $boxes = array();
public $config_page_url = array();
public $const = array();
public $const_name = "";
public $db;
public $depends = array();
public $description = "";
public $dirs = array();
public $family = "";
public $langfiles = array();
public $menu = array();
public $name = "";
public $need_dolibarr_version = array();
public $numero;
public $phpmin = array();
public $picto = "";
public $requiredby = array();
public $rights = array();
public $rights_class = "";
public $special;
public $style_sheet = "";
public $version = "";
?>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Bobshit75
Messages postés29Date d'inscriptionlundi 28 février 2011StatutMembreDernière intervention13 juillet 2011 24 mai 2011 à 10:22
Ne trouvant pas le bouton d'édition, je t'explique pourquoi ça pourrait venir de là. Ton erreur vient de la ligne 34 soit au début de ta déclaration. Tes variables n'ont pas d'association à un type c'est à dire à un string (=> ""), tableau (=> array()), ou int (=> il me semble que on y met rien).