]> granicus.if.org Git - php/commitdiff
Setting "compatibility" parameter requires having a PDF structure that
authorJoey Smith <joey@php.net>
Sun, 23 Jul 2000 08:31:13 +0000 (08:31 +0000)
committerJoey Smith <joey@php.net>
Sun, 23 Jul 2000 08:31:13 +0000 (08:31 +0000)
has NOT had PDF_open_*() called on it, according to the documentation.

There is not currently any way to obtain such from user-land in PHP.
@ Catch users trying to set "compatibility" parameter, which is not
@ supported from user-land.
#
# Not sure this is the best way to do this...
# Uwe, could you please double check this?

ext/pdf/pdf.c

index cab3158d5615e4c5e0fbb3a6670f117f69a8b2df..15fc38ed124fadbbd9eddb5c8085e099345d2b1a 100644 (file)
@@ -1844,6 +1844,11 @@ PHP_FUNCTION(pdf_set_parameter) {
                RETURN_FALSE;
        }
 
+    if (arg2->value.str.val == "compatibility") {
+               php_error(E_ERROR,"Compatibility modes not supported at this time");
+               RETURN_FALSE;
+       }
+       
        PDF_set_parameter(pdf, arg2->value.str.val, arg3->value.str.val);
 
        RETURN_TRUE;