Date: 09/22/00
- Next message: Ulf Wendel: "Re: [phplib-dev] Return values"
- Previous message: Ulf Wendel: "Re: [phplib-dev] RFC: Changes to template.inc"
- Next in thread: Ulf Wendel: "Re: [phplib-dev] Return values"
- Reply: Ulf Wendel: "Re: [phplib-dev] Return values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've seen, that many phpLib functions return "nothing" on success an
"false" on error. Is this a bug or a feature?
I tried to create an error handler which catches all errors and prints
my own error message in the end. But by not returning any value on
success something like this won't work:
$t = new Template;
$t->halt_on_error='no';
$t->set_file('page','file.ihtml') || $this->error[] = 'File not found!'
..
How can i determine if the function was successful? As far as i know,
there's no way to distinguish between undefined and false in PHP.
Am i completely wrong with my proposal to return true on success in
every phpLib function?
bye
mike
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>
- Next message: Ulf Wendel: "Re: [phplib-dev] Return values"
- Previous message: Ulf Wendel: "Re: [phplib-dev] RFC: Changes to template.inc"
- Next in thread: Ulf Wendel: "Re: [phplib-dev] Return values"
- Reply: Ulf Wendel: "Re: [phplib-dev] Return values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

