Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: cannot redeclare class when calling thumbnails.php?album=  (Read 3834 times)

0 Members and 1 Guest are viewing this topic.

blueyed

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://thequod.de
cannot redeclare class when calling thumbnails.php?album=
« on: November 13, 2003, 05:55:25 pm »

due to this bug http://forum.coppermine-gallery.net/index.php?topic=1211 I get a link like thumbnails.php?album= (without album ID).

When I follow it, I get
Code: [Select]
Fatal error: Cannot redeclare class site in c:\mypath\site.php on line 25

That's an include file, which I included in the theme like that:
Code: [Select]

//in theme.php added this function:
function generate_tqmenu(){   //       tqchanged
   global $lang_translation_info, $SiteMap, $lang;
   if ($lang_translation_info['lang_name_english']=='German') $_deflang='de'; else $_deflang='en';
   require '../../site.php';
   
   $html='some html';
   return $html;
}

//added this to $template_vars array:
        '{TQMENU}' => generate_tqmenu()   //       tqchanged

//and call it in template.html:
{TQMENU}


This works good in general, but not in this special case ("?album="). Using require_once instead, solves this particular error, but it seems like site.php gets included twice... strangely there is only one echo-output, if I put it at top of the generate_tqmenu() function for debug pruposes..?!?
I also have to make the variables ($SiteMap, ..) that get set in site.php global in generate_tqmenu() in this special case...

I'm using PHP 4.3.4..
 :?
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 19 queries.