php-tidy vs tidyReleaseDate

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

php-tidy vs tidyReleaseDate

David Gwynne-5
the tidy php extension tries to call tidyReleaseDate to get some
silly version string, but the library symbol doesnt exist for it
to resolve. this points it at tidyVersion instead.

you can reproduce the problem this solves by enabling the tidy
extension and running "php-5.3 -i" or by writing a script that calls
phpinfo(). they should segfault after complaining about a missing
symbol.

the only caveat to this is the meaning of tidyReleaseDate doesnt
map well to what tidyVersion returns now (which is a version number),
but i dont care.

im happy for someone else to commit this at the most appropriate
time.

Index: 5.3/patches/patch-ext_tidy_tidy_c
===================================================================
RCS file: /cvs/ports/lang/php/5.3/patches/patch-ext_tidy_tidy_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-ext_tidy_tidy_c
--- 5.3/patches/patch-ext_tidy_tidy_c 18 Jun 2011 19:49:50 -0000 1.2
+++ 5.3/patches/patch-ext_tidy_tidy_c 22 Jul 2013 04:32:48 -0000
@@ -10,3 +10,21 @@ $OpenBSD: patch-ext_tidy_tidy_c,v 1.2 20
  #include "buffio.h"
 
  /* compatibility with older versions of libtidy */
+@@ -1095,7 +1095,7 @@
+ {
+ php_info_print_table_start();
+ php_info_print_table_header(2, "Tidy support", "enabled");
+- php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
++ php_info_print_table_row(2, "libTidy Release", (char *)tidyVersion());
+ php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id$)");
+ php_info_print_table_end();
+
+@@ -1309,7 +1309,7 @@
+ return;
+ }
+
+- RETURN_STRING((char *)tidyReleaseDate(), 1);
++ RETURN_STRING((char *)tidyVersion(), 1);
+ }
+ /* }}} */
+