Re: patch files for PEAR

From: Date: Thu, 28 Aug 2003 00:35:43 +0000
Subject: Re: patch files for PEAR
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20698@lists.php.net to get a copy of this message
generally yes.. - but I've yet to find a better way to do $val = (isset($_POST['x']) && !is_null($_POST['x'])) ? $_POST['x'] : null; $val = @$_POST['x']; I agree though @include and @require are the most evil constructs in PHP.. - it can die on a syntax error without telling you what's gone wrong. Tomas V.V.Cox wrote:
On Monday, August 25, 2003 7:50, Brad Bulger wrote:
a few patch files based on trying to run with the Web frontend. some undefined variables, some errors that needed more info. if you like them, they're yours.
a general comment: a while ago, someone proposed to internals a php.ini setting for disabling the '@' error-suppression mechanism. he basically got hooted out of school, but i am beginning to see what he meant.
the @ thing is at least close to being overused. it's become like duct tape. in trying to make things work with PHP 5, whenever there was a problem, i would frequently have to remove layer after layer of error suppression until i found out what wasn't working. or using it to avoid undefined index errors. i mean, that works, but hmm.
I'm completely against using the '@' feature, as the error it produces does not be shown but will be still logged if you use log_errors. Please guys avoid it use. That "lazy" feature only hides potential bugs.
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.dev (#20698) next »