[imp] Fatal error: Cannot redeclare class lang
Peter Solodov
peter at alcor.concordia.ca
Fri Jul 18 09:36:23 PDT 2003
On Thu, 17 Jul 2003, Andrej Tazberik wrote:
> I am using IMP ( horde-2.2.3, imp-3.2.1, Solaris 9, apache 1.3.27
> and PHP 4.3.2 ), but when I want to download attachement from
> received mail, I get following error:
>
> Fatal error: Cannot redeclare class lang in
> ../lib/../../lib/Lang.php on line 14
>
> Do you think you could help me to solve this problem?
I saw that. And I even fixed it. But I'm not sure if the fix is
correct. Appended are related diffs. Besides changes to Horde's
Registry.php I had to change all "define" statements in IMP's
constants.php to "@define" because otherwise PHP was complaining about
multiple definitions.
- Peter
--
Peter Solodov | Concordia University
http://alcor.concordia.ca/~peter | Montreal, QC, Canada
--- /tmp/horde-2.2.3/lib/Registry.php.original 2003-01-16 15:14:42.000000000 -0500
+++ /tmp/horde-2.2.3/lib/Registry.php 2003-07-17 10:07:30.000000000 -0400
@@ -12,6 +12,7 @@
require_once 'PEAR.php';
require_once dirname(__FILE__) . '/Horde.php';
+require_once dirname(__FILE__) . '/Lang.php';
/**
* The Registry:: class provides a set of methods for communication
@@ -102,7 +103,7 @@
include_once $base . '/config/registry.php';
/* Initialize the localization routines and variables */
- include_once $base . '/lib/Lang.php';
+ //include_once $base . '/lib/Lang.php';
Lang::setLang();
Lang::setTextdomain('horde', $base . '/locale', Lang::getCharset());
@@ -508,7 +509,7 @@
/* Reset the language in case that there is a different one
selected in the preferences. */
- include_once HORDE_BASE . '/lib/Lang.php';
+ //include_once HORDE_BASE . '/lib/Lang.php';
$language = '';
if (isset($this->prefsCache[$app]) && isset($this->prefsCache[$app]->prefs['language'])) {
$language = $this->prefsCache[$app]->getValue('language');
@@ -543,7 +544,7 @@
if ($current) {
$this->importConfig($current);
$this->loadPrefs($current);
- include_once HORDE_BASE . '/lib/Lang.php';
+ //include_once HORDE_BASE . '/lib/Lang.php';
$language = $GLOBALS['prefs']->getValue('language');
if (isset($language)) {
Lang::setLang($language);
More information about the imp
mailing list