[PHP-DEV] Bug #11769 Updated: PDF_setcolor (invalid type of the third argument)
ID: 11769 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: PDF related Operating system: PHP Version: 4.0.5 Assigned To: Comments: Fixed in PHP 4.0.6 Previous Comments: --- [2001-06-28 05:06:08] [EMAIL PROTECTED] in pdf.c file: PHP_FUNCTION(pdf_setcolor) { zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; /* int c1; */ float c1; == TO BE MODIFIED !! (replace the int by a float) if (ZEND_NUM_ARGS() != 7 || zend_get_parameters_ex(7, arg1, arg2, arg3, arg4, arg5, arg6, arg7) == FAILURE) { WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, pdf object, le_pdf); convert_to_string_ex(arg2); convert_to_string_ex(arg3); convert_to_double_ex(arg4); convert_to_double_ex(arg5); convert_to_double_ex(arg6); convert_to_double_ex(arg7); if (0 == (strcmp(Z_STRVAL_PP(arg3), spot))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_SPOT_OFFSET; } else if(0 == (strcmp(Z_STRVAL_PP(arg3), pattern))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_PATTERN_OFFSET; } else { c1 = (float) Z_DVAL_PP(arg4); } PDF_setcolor(pdf, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3), (float) c1, (float) Z_DVAL_PP(arg5), (float) Z_DVAL_PP(arg6), (float) Z_DVAL_PP(arg7)); RETURN_TRUE; } --- [2001-06-28 05:03:45] [EMAIL PROTECTED] PHP_FUNCTION(pdf_setcolor) { zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; float c1; == TO BE MODIFIED !! (replace the int by a float) if (ZEND_NUM_ARGS() != 7 || zend_get_parameters_ex(7, arg1, arg2, arg3, arg4, arg5, arg6, arg7) == FAILURE) { WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, pdf object, le_pdf); convert_to_string_ex(arg2); convert_to_string_ex(arg3); convert_to_double_ex(arg4); convert_to_double_ex(arg5); convert_to_double_ex(arg6); convert_to_double_ex(arg7); if (0 == (strcmp(Z_STRVAL_PP(arg3), spot))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_SPOT_OFFSET; } else if(0 == (strcmp(Z_STRVAL_PP(arg3), pattern))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_PATTERN_OFFSET; } else { c1 = (float) Z_DVAL_PP(arg4); } PDF_setcolor(pdf, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3), (float) c1, (float) Z_DVAL_PP(arg5), (float) Z_DVAL_PP(arg6), (float) Z_DVAL_PP(arg7)); RETURN_TRUE; } --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11769edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #11769 Updated: PDF_setcolor (invalid type of the third argument)
ID: 11769 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: PDF related Operating system: Solaris 2.8 PHP Version: 4.0.5 Description: PDF_setcolor (invalid type of the third argument) in pdf.c file: PHP_FUNCTION(pdf_setcolor) { zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; /* int c1; */ float c1; == TO BE MODIFIED !! (replace the int by a float) if (ZEND_NUM_ARGS() != 7 || zend_get_parameters_ex(7, arg1, arg2, arg3, arg4, arg5, arg6, arg7) == FAILURE) { WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, pdf object, le_pdf); convert_to_string_ex(arg2); convert_to_string_ex(arg3); convert_to_double_ex(arg4); convert_to_double_ex(arg5); convert_to_double_ex(arg6); convert_to_double_ex(arg7); if (0 == (strcmp(Z_STRVAL_PP(arg3), spot))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_SPOT_OFFSET; } else if(0 == (strcmp(Z_STRVAL_PP(arg3), pattern))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_PATTERN_OFFSET; } else { c1 = (float) Z_DVAL_PP(arg4); } PDF_setcolor(pdf, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3), (float) c1, (float) Z_DVAL_PP(arg5), (float) Z_DVAL_PP(arg6), (float) Z_DVAL_PP(arg7)); RETURN_TRUE; } Previous Comments: --- [2001-06-28 05:03:45] [EMAIL PROTECTED] PHP_FUNCTION(pdf_setcolor) { zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; float c1; == TO BE MODIFIED !! (replace the int by a float) if (ZEND_NUM_ARGS() != 7 || zend_get_parameters_ex(7, arg1, arg2, arg3, arg4, arg5, arg6, arg7) == FAILURE) { WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, pdf object, le_pdf); convert_to_string_ex(arg2); convert_to_string_ex(arg3); convert_to_double_ex(arg4); convert_to_double_ex(arg5); convert_to_double_ex(arg6); convert_to_double_ex(arg7); if (0 == (strcmp(Z_STRVAL_PP(arg3), spot))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_SPOT_OFFSET; } else if(0 == (strcmp(Z_STRVAL_PP(arg3), pattern))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_PATTERN_OFFSET; } else { c1 = (float) Z_DVAL_PP(arg4); } PDF_setcolor(pdf, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3), (float) c1, (float) Z_DVAL_PP(arg5), (float) Z_DVAL_PP(arg6), (float) Z_DVAL_PP(arg7)); RETURN_TRUE; } --- Full Bug description available at: http://bugs.php.net/?id=11769 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]