- CURL:
. Fixed bug #75093 (OpenSSL support not detected). (Remi)
+- Intl:
+ . Fixed bug #75090 (IntlGregorianCalendar doesn't have constants from parent
+ class). (tpunt)
+
- PDO_OCI:
. Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized
before PHP-FPM sets it up). (Ingmar Runge)
Calendar_handlers.dtor_obj = Calendar_objects_dtor;
Calendar_handlers.free_obj = Calendar_objects_free;
- /* Create and register 'IntlGregorianCalendar' class. */
- INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
- GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
- Calendar_ce_ptr);
- if (!GregorianCalendar_ce_ptr) {
- //can't happen know without bigger problems before
- php_error_docref0(NULL, E_ERROR,
- "IntlGregorianCalendar: class registration has failed.");
- return;
- }
-
/* Declare 'IntlCalendar' class constants */
#define CALENDAR_DECL_LONG_CONST(name, val) \
zend_declare_class_constant_long(Calendar_ce_ptr, name, sizeof(name) - 1, \
CALENDAR_DECL_LONG_CONST("WALLTIME_LAST", UCAL_WALLTIME_LAST);
CALENDAR_DECL_LONG_CONST("WALLTIME_NEXT_VALID", UCAL_WALLTIME_NEXT_VALID);
#endif
+
+ /* Create and register 'IntlGregorianCalendar' class. */
+ INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
+ GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
+ Calendar_ce_ptr);
+ if (!GregorianCalendar_ce_ptr) {
+ //can't happen know without bigger problems before
+ php_error_docref0(NULL, E_ERROR,
+ "IntlGregorianCalendar: class registration has failed.");
+ return;
+ }
}
/* }}} */
--- /dev/null
+--TEST--
+Bug #75090 Constants of parent IntlCalendar class not inherited
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+class Foo extends IntlCalendar {}
+
+$fooRef = new ReflectionClass(Foo::class);
+$intlGregorianCalendarRef = new ReflectionClass(IntlGregorianCalendar::class);
+$intlCalendarRef = new ReflectionClass(IntlCalendar::class);
+
+var_dump(
+ count($fooRef->getConstants()) === count($intlCalendarRef->getConstants()),
+ count($intlGregorianCalendarRef->getConstants()) === count($intlCalendarRef->getConstants())
+);
+?>
+===DONE===
+--EXPECT--
+bool(true)
+bool(true)
+===DONE===