[Phpslash-devel] config.php ordering problem
Brought to you by:
joestewart,
nhruby
From: Dave R. <di...@sh...> - 2004-05-14 06:18:17
|
Hi, I've been working with back-end for awhile. I've run into a config.php problem and Mike Gifford suggested I follow it up here. The symptom is that when $_PSL['timezone']['engine'] is true, any errors logging in via login.php cause a blank page to be returned. The problem is this: BE extends functions.inc getHeader() to add current date to the template. This uses psl_dateLong(), which uses psl_strftime(), which needs the tz library and classes if $_PSL['timezone']['engine'] is set. Trouble is, config.php calls page_open() _before_ the AddClassRequirement() and AddLibraryRequirement() calls for tz and friends. In the case of a posted bad username or password, page_open() tries to render the login form which causes getHeader() to be called, and the tz library call blows up. So my question is - why are some of the Add*Requirement() calls (particularly the ones for tz et al) in config.php after the page_open? I see in phpslash-dev CVS config-dist.php that this is still true. What would be the implications of moving these Add*Requirement() calls to before page_open()? Dave Reid |