Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
r273 notice
#1
Hello,

I suggest :

admin/inc/common.php :
Code:
if (file_exists(GSROOTPATH . 'gsconfig.php')) {
    require_once(GSROOTPATH . 'gsconfig.php');
}

instead of :

Code:
if (file_exists(GSROOTPATH . 'gsconfig.php')) {
    include(GSROOTPATH . 'gsconfig.php');
}

It avoids conflicts (resulting in Php notices - Constant already defined) with /index.php L14 already calling gsconfig.php.
Reply
#2
Semantically this should probably be include_once() rather than require_once() as gsconfig.php doesn't need to exist at all, however...

If GSDEBUG is defined, including gsconfig.php more than once can lock up the webserver due to repeated attempts to open errorlog.txt so that the notices about duplicate definitions can be logged.

Edit: This affects r275.
Reply




Users browsing this thread: 1 Guest(s)