diff options
Diffstat (limited to 'ext/standard/syslog.c')
-rw-r--r-- | ext/standard/syslog.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index fecbc6fe65..e3c301e1e2 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2018 The PHP Group | + | Copyright (c) 1997-2017 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -12,7 +12,7 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Author: Stig Sæther Bakken <ssb@php.net> | + | Author: Stig Sæther Bakken <ssb@php.net> | +----------------------------------------------------------------------+ */ @@ -138,10 +138,12 @@ PHP_FUNCTION(openlog) zend_long option, facility; size_t ident_len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sll", &ident, - &ident_len, &option, &facility) == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_START(3, 3) + Z_PARAM_STRING(ident, ident_len) + Z_PARAM_LONG(option) + Z_PARAM_LONG(facility) + ZEND_PARSE_PARAMETERS_END(); + if (BG(syslog_device)) { free(BG(syslog_device)); } @@ -179,10 +181,10 @@ PHP_FUNCTION(syslog) char *message; size_t message_len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &priority, - &message, &message_len) == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_START(2, 2) + Z_PARAM_LONG(priority) + Z_PARAM_STRING(message, message_len) + ZEND_PARSE_PARAMETERS_END(); php_syslog(priority, "%s", message); RETURN_TRUE; |