diff options
| author | John Boehr <jbboehr@gmail.com> | 2016-09-21 20:09:45 -0700 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2016-09-22 12:32:37 +0200 |
| commit | 8e313becf4190a8cdc4ef52a1efdbce475f51ae0 (patch) | |
| tree | 37346f7212994d48f7ede762ac791ca9d5c87697 /Zend/zend_builtin_functions.c | |
| parent | 01759c43463c30b57c15e32c5f4b454fba81f039 (diff) | |
| download | php-git-8e313becf4190a8cdc4ef52a1efdbce475f51ae0.tar.gz | |
Fix bug #69579
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 4f2a62d822..c3160d0a6f 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -31,6 +31,10 @@ #undef ZEND_TEST_EXCEPTIONS +#if ZEND_DEBUG +static zend_class_entry *zend_test_trait; +#endif + static ZEND_FUNCTION(zend_version); static ZEND_FUNCTION(func_num_args); static ZEND_FUNCTION(func_get_arg); @@ -257,6 +261,18 @@ ZEND_END_ARG_INFO() /* }}} */ +#if ZEND_DEBUG +static ZEND_METHOD(_ZendTestTrait, testMethod) /* {{{ */ { + RETURN_TRUE; +} +/* }}} */ + +static zend_function_entry zend_test_trait_methods[] = { + ZEND_ME(_ZendTestTrait, testMethod, arginfo_zend__void, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; +#endif + static const zend_function_entry builtin_functions[] = { /* {{{ */ ZEND_FE(zend_version, arginfo_zend__void) ZEND_FE(func_num_args, arginfo_zend__void) @@ -339,6 +355,13 @@ ZEND_MINIT_FUNCTION(core) { /* {{{ */ zend_register_default_classes(); +#if ZEND_DEBUG + INIT_CLASS_ENTRY(class_entry, "_ZendTestTrait", zend_test_trait_methods); + zend_test_trait = zend_register_internal_class(&class_entry); + zend_test_trait->ce_flags |= ZEND_ACC_TRAIT; + zend_declare_property_null(zend_test_trait, "testProp", sizeof("testProp")-1, ZEND_ACC_PUBLIC); +#endif + return SUCCESS; } /* }}} */ |
