File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -178,13 +178,12 @@ END {
178
178
" <funcprototype>\n " \
179
179
" <funcdef>" types[ i] " <function>" funcs[ i] " </function></funcdef>\n "
180
180
181
- fetchargs = " \t if (zend_parse_parameters( "
182
- if (spec_opts [ i ] ) {
181
+ if (maxargs [ i ] > 0 ) {
182
+ fetchargs = " \t if (zend_parse_parameters( "
183
183
ints = ints " \t int argc = ZEND_NUM_ARGS();\n "
184
- fetchargs = fetchargs " argc"
184
+ fetchargs = fetchargs " argc, " specs [ i ]
185
185
} else
186
- fetchargs = fetchargs " ZEND_NUM_ARGS()"
187
- fetchargs = fetchargs " , " specs[ i]
186
+ fetchargs = fetchargs " \t if (ZEND_NUM_ARGS() != 0) {\n\t\t WRONG_PARAM_COUNT;\n\t }"
188
187
189
188
for (j = 0 ; j < maxargs[ i] ; j++ ) {
190
189
@@ -219,7 +218,9 @@ END {
219
218
}
220
219
221
220
proto = proto closeopts " )\n " fcomments[ i] " */\n PHP_FUNCTION(" funcs[ i] " )\n {"
222
- fetchargs = fetchargs " ) == FAILURE)" closefetch " \n\t\t return;\n "
221
+ if (maxargs[ i] > 0 ) {
222
+ fetchargs = fetchargs " ) == FAILURE)" closefetch " \n\t\t return;\n "
223
+ }
223
224
funcvals = strings ints longs doubles bools zvals
224
225
xmlstr = xmlstr xmlparams \
225
226
" </funcprototype>\n " \
You can’t perform that action at this time.
0 commit comments