rasmus Fri Oct 1 15:28:45 2004 EDT
Modified files:
/php-src/ext/ming ming.c
Log:
Slightly different fix for HEAD for the ming output method BC breaking
change.
http://cvs.php.net/diff.php/php-src/ext/ming/ming.c?r1=1.73&r2=1.74&ty=u
Index: php-src/ext/ming/ming.c
diff -u php-src/ext/ming/ming.c:1.73 php-src/ext/ming/ming.c:1.74
--- php-src/ext/ming/ming.c:1.73 Thu Sep 9 05:08:32 2004
+++ php-src/ext/ming/ming.c Fri Oct 1 15:28:44 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ming.c,v 1.73 2004/09/09 09:08:32 helly Exp $ */
+/* $Id: ming.c,v 1.74 2004/10/01 19:28:44 rasmus Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -2207,25 +2207,28 @@
#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));
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php