Re: [studs-user] NULL values causing blank pages.
Status: Beta
Brought to you by:
mojavelinux
|
From: Dan A. <dan...@gm...> - 2005-08-31 20:52:25
|
Ryan, This is a known issue, though it doesn't always occur in all cases.=20 It depends on where the null reference shows up. Studs works by intercepting the error handling of PHP with a custom error handler. It also uses output buffering to catch errors that are not normally reported. I have it on the TODO list to reconcile this situation so that the error does make it all the way out. I will make it part of the sample application to handle this case. As a general work around though, it is a very good idea to do null checks and proper unit testing, because nulls are a very difficult problem to deal with when they start happening. The same goes for java as well. A null pointer exception can deliver almost no information. Short answer, yes it is known and yes I am looking for a nice solution. /dan On 8/31/05, Ryan Green <ry...@me...> wrote: > =20 > =20 >=20 > Hello all,=20 >=20 > =20 >=20 > I'm a new user of studs and a novice php coder. =20 >=20 > =20 >=20 > In the process of building our site, there are a number of instances wher= e > an unchecked null value seems to wreak havoc on my pages. Seems the erro= r > somehow destroys the request data and the browser won't display the page.= =20 > In Mozilla, my page just doesn't change, or returns blank. In IE, I rece= ive > a cannot display page error.=20 >=20 > =20 >=20 > Usually, if I'm able to track down the error via php logs, the error will= be > "Call to a member function on a non-object."=20 >=20 > =20 >=20 > Anyway, has anyone run into this same sort of problem. It often makes > debugging very difficult when I don't receive an error. Is the expected > behavior?=20 >=20 > =20 >=20 > Regards,=20 >=20 > Ryan=20 >=20 > =20 >=20 > Ryan Green=20 >=20 > Media Greenhouse=20 >=20 > 970 581 9899=20 >=20 > aolim ryang8880=20 >=20 > http://www.mediagreenhouse.com=20 >=20 > =20 --=20 Open Source Advocacy http://www.mojavelinux.com |