diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-09-03 09:25:21 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-09-03 09:27:55 +0200 |
commit | de643aaa46740f24038659059b2a3e8c9fcdf216 (patch) | |
tree | 5fc46a8a537210ced498adf761371aa043677131 | |
parent | 632708ac0256a5c447ece8350a31df0b07f7878b (diff) | |
download | php-git-de643aaa46740f24038659059b2a3e8c9fcdf216.tar.gz |
Add missing argument checks
These functions don't expect any arguments, so we check that none are
given.
-rw-r--r-- | ext/xmlwriter/php_xmlwriter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index 3f7b0da924..2fa4e32854 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -1179,6 +1179,9 @@ static PHP_FUNCTION(xmlwriter_start_cdata) zval *self = getThis(); if (self) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } XMLWRITER_FROM_OBJECT(intern, self); } else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pind) == FAILURE) { @@ -1245,6 +1248,9 @@ static PHP_FUNCTION(xmlwriter_start_comment) zval *self = getThis(); if (self) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } XMLWRITER_FROM_OBJECT(intern, self); } else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pind) == FAILURE) { |