diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2004-10-01 19:28:45 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2004-10-01 19:28:45 +0000 |
commit | 3d85a5d8768ea58c387c81e4a47c9642171b69f7 (patch) | |
tree | 6fa1da6847294934f0de813416662210f47a6f64 /ext/ming | |
parent | b4a5314dc334617e610713f73df730e5da0191cf (diff) | |
download | php-git-3d85a5d8768ea58c387c81e4a47c9642171b69f7.tar.gz |
Slightly different fix for HEAD for the ming output method BC breaking
change.
Diffstat (limited to 'ext/ming')
-rw-r--r-- | ext/ming/ming.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/ext/ming/ming.c b/ext/ming/ming.c index 9bad646777..8d7d7170bf 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -2207,25 +2207,28 @@ PHP_METHOD(swfmovie, output) #ifdef HAVE_MING_ZLIB zval **zlimit = NULL; int limit = -1; + int argc = ZEND_NUM_ARGS(); int oldval = INT_MIN; long out; - if (zend_get_parameters_ex(1, &zlimit) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(argc) { + if (zend_get_parameters_ex(1, &zlimit) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(zlimit); - limit = Z_LVAL_PP(zlimit); + convert_to_long_ex(zlimit); + limit = Z_LVAL_PP(zlimit); - if ((limit < 0) || (limit > 9)) { - php_error(E_WARNING,"compression level must be within 0..9"); - RETURN_FALSE; + if ((limit < 0) || (limit > 9)) { + php_error(E_WARNING,"compression level must be within 0..9"); + RETURN_FALSE; + } } oldval = Ming_setSWFCompression(limit); out = SWFMovie_output(movie, &phpByteOutputMethod, NULL); - if (oldval >= -1 && oldval <= 9) + if (oldval >= -1 && oldval <= 9) { Ming_setSWFCompression(oldval); - + } RETURN_LONG(out); #else RETURN_LONG(SWFMovie_output(movie, &phpByteOutputMethod, NULL)); |