Bug #12465 Updated: posix_* issuing Warnings, no error code.

From: Date: Thu, 28 Feb 2002 19:48:28 +0000
Subject: Bug #12465 Updated: posix_* issuing Warnings, no error code.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1318@lists.php.net to get a copy of this message
ID: 12465 Updated by: herp@wildsau.idv.uni-linz.ac.at Reported By: herp@wildsau.idv.uni-linz.ac.at Status: Bogus Bug Type: POSIX related Operating System: Linux PHP Version: 4.0.6 New Comment: It´s still nonsense to write an error-message! stat() *IS STILL USED* for checking the existence of files. Why do I have to *suppress* error-messages?! PHP should not *generate* them in the first! *If* you choose to implement stat() and name it after the C-function, then stat() should behave as closely as possible like its C-equivalent. Previous Comments: ------------------------------------------------------------------------ [2002-02-04 02:46:54] yohgaki@php.net It returns false. You need to get rid of error messages with @... ------------------------------------------------------------------------ [2001-07-30 09:24:17] herp@wildsau.idv.uni-linz.ac.at hi, I tried to use some of the posix_* functions to work with user-accounts on the system, like "posix_getpwnam()" and "posix_getpwuid()". I expected to get an error-code back (like Failed or FALSE) for pwnames or pwuids which do not exist in /etc/passwd. Instead, PHP will write a warning message in my html-output: : Warning: posix_getpwuid(4711) failed with 'Success' in : /data/home/webmaster/admin/admin.php : on line 197 and, what I think is strange, will "fail with ´Success´". Could you please modify the posix_getpw* functions in a way that they 1) do not write strange warning-messages and 2) return a NULL-Value or FALSE, where the unix getpw*(3) will return NULL (just like documented in the man-page) thanks in advance, herbert rosmanith herp@wildsau.idv.uni-linz.ac.at ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=12465&edit=1

« previous php.bugs (#1318) next »