Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/tests/inheritance/argument_restriction_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ class Sub extends Base {
}
?>
--EXPECTF--
Fatal error: Declaration of & Sub::test() must be compatible with & Base::test($foo, array $bar, $option = null, $extra = 'llllllllll...') in %s on line %d
Fatal error: Declaration of &Sub::test() must be compatible with &Base::test($foo, array $bar, $option = null, $extra = 'llllllllll...') in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/objects/objects_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class test3 extends test {

?>
--EXPECTF--
Fatal error: Declaration of test3::foo() must be compatible with & test::foo() in %s on line %d
Fatal error: Declaration of test3::foo() must be compatible with &test::foo() in %s on line %d
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ class A implements I {

?>
--EXPECTF--
Fatal error: Declaration of A::$prop::get() must be compatible with & I::$prop::get() in %s on line %d
Fatal error: Declaration of A::$prop::get() must be compatible with &I::$prop::get() in %s on line %d
2 changes: 1 addition & 1 deletion Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ static ZEND_COLD zend_string *zend_get_function_declaration(
smart_str str = {0};

if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
smart_str_appends(&str, "& ");
smart_str_appendc(&str, '&');
}

if (fptr->common.scope) {
Expand Down
31 changes: 23 additions & 8 deletions ext/tidy/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,34 @@ if test "$PHP_TIDY" != "no"; then
[],
[-L$TIDY_LIBDIR])

dnl The tidyOptGetCategory function (added in libtidy 5.4.0) if only useable
dnl if TidyInternalCategory (added in libtidy 5.6.0) is also present.
PHP_CHECK_LIBRARY([$TIDY_LIB_NAME], [tidyInternalCategory],
[AC_DEFINE([HAVE_TIDYOPTGETCATEGORY], [1],
[Define to 1 if Tidy library has the 'tidyOptGetCategory' function.])],
[],
[-L$TIDY_LIBDIR])

PHP_ADD_LIBRARY_WITH_PATH([$TIDY_LIB_NAME],
[$TIDY_LIBDIR],
[TIDY_SHARED_LIBADD])
PHP_ADD_INCLUDE([$TIDY_INCDIR])

old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$TIDY_INCDIR

dnl The tidyOptGetCategory function (added in tidy-html5 5.4.0) is only
dnl useable if TidyInternalCategory (added in tidy-html5 5.6.0) is also
dnl present.
AC_CACHE_CHECK([for tidyOptGetCategory], [php_ac_cv_have_tidyoptgetcategory],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <tidy.h>],[
TidyDoc doc = tidyCreate();
TidyOption badopt = tidyGetOptionByName(doc, "<bad>");
Bool v = (tidyOptGetCategory(badopt) == TidyInternalCategory);
(void)v;
tidyRelease(doc);
])],
[php_ac_cv_have_tidyoptgetcategory=yes],
[php_ac_cv_have_tidyoptgetcategory=no])
])
AS_VAR_IF([php_ac_cv_have_tidyoptgetcategory], [yes],
[AC_DEFINE([HAVE_TIDYOPTGETCATEGORY], [1],
[Define to 1 if tidyOptGetCategory is available.])])

CPPFLAGS=$old_CPPFLAGS

dnl Add -Wno-ignored-qualifiers as this is an issue upstream. Fixed in
dnl tidy-html5 5.7.20: https://github.com/htacg/tidy-html5/issues/866
PHP_NEW_EXTENSION([tidy],
Expand Down