convert_to_string_ex(argv[1]);
if(0 == (strncmp(Z_STRVAL_PP(argv[1]), "image", 5))) {
- int pdf_image;
- if(argc < 3)
- WRONG_PARAM_COUNT;
+ int *pdf_image;
+ if(argc < 3) WRONG_PARAM_COUNT;
- ZEND_FETCH_RESOURCE(pdf_image, int, argv[0], -1, "pdf image", le_pdf_image);
- value = PDF_get_value(pdf, Z_STRVAL_PP(argv[1]), pdf_image);
+ ZEND_FETCH_RESOURCE(pdf_image, int *, argv[2], -1, "pdf image", le_pdf_image);
+ value = PDF_get_value(pdf, Z_STRVAL_PP(argv[1]), *pdf_image);
} else {