|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53448 Syslog never returns false while a FALSE is documented in php manual
Submitted: 2010-12-02 08:14 UTC Modified: 2010-12-02 11:49 UTC
From: sskaje at gmail dot com Assigned:
Status: Not a bug Package: Network related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2010-12-02 08:14 UTC] sskaje at gmail dot com
Sorry for the 'Package affected' select, network related is selected due to the syslog() in php manual

in line 273 of ext/standard/syslog.c, i found following code:
272     php_syslog(priority, "%s", message);
273     RETURN_TRUE;
while in, it writes:
Return Values
Returns TRUE on success or FALSE on failure. 
Another return value is null from :
267     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &priority,
268                               &message, &message_len) == FAILURE) {
269         return;
270     }
null is returned only if there is a parameter error.

Can your bring a FALSE returned by php's syslog();

Test script:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-02 11:49 UTC]
-Status: Open +Status: Bogus
 [2010-12-02 11:49 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

Parsing parameters is a special case:

"Note:  If the parameters given to a function are not what it expects, such as passing an array where a string is expected, the return value of the function is undefined. In this case it will likely return NULL but this is just a convention, and cannot be relied upon."
 [2010-12-02 12:03 UTC] sskaje at gmail dot com
I reported as a feature requesting but not a bug.

In php manual it documented a return value of FALSE, but in that file it RETURN_TRUE without checking if syslog()/std_syslog() works.

I just want a RETURN_FALSE after checking the return value of 
272     php_syslog(priority, "%s", message);
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Jan 29 02:03:43 2023 UTC