mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- fix to work with new version of FdfTk
This commit is contained in:
parent
6dea22808e
commit
6f4cca9cff
2 changed files with 8 additions and 1 deletions
|
@ -18,7 +18,7 @@ AC_ARG_WITH(fdftk,
|
|||
],[AC_MSG_ERROR(fdftk module requires fdftk 2.0)])
|
||||
;;
|
||||
*)
|
||||
test -f $withval/include/Fdftk.h && FDFLIB_INCLUDE="-I$withval/include"
|
||||
test -f $withval/include/FdfTk.h && FDFLIB_INCLUDE="-I$withval/include"
|
||||
if test -n "$FDFLIB_INCLUDE" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
PHP_EXTENSION(fdf)
|
||||
|
|
|
@ -217,6 +217,13 @@ PHP_FUNCTION(fdf_get_value) {
|
|||
err = FDFGetValue(fdf, arg2->value.str.val, NULL, 0, &nr);
|
||||
if(err != FDFErcOK)
|
||||
printf("Aiii, error\n");
|
||||
/* In the inofficial version of FdfTK 4.0 (as FDFGetVersion says. The
|
||||
library has a name with version 3.0, don't know what adobe has in
|
||||
mind) the number of bytes of the value doesn't include the trailing
|
||||
'\0'. This was not the case in 2.0
|
||||
*/
|
||||
if(strcmp(FDFGetVersion(), "2.0"))
|
||||
nr++;
|
||||
buffer = emalloc(nr);
|
||||
err = FDFGetValue(fdf, arg2->value.str.val, buffer, nr, &nr);
|
||||
if(err != FDFErcOK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue