diff options
author | Adam Cozzette <acozzette@google.com> | 2018-08-01 13:44:55 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2018-08-01 13:44:55 -0700 |
commit | 94d55e529204cc8575bf1070dc1e2375dbc8a4c5 (patch) | |
tree | 20730e597f914fd2430c66b9bebe633e017a4fe0 /php/ext/google/protobuf/message.c | |
parent | 3d62db3ecd5377025a458bca827ab4ca12d5c1f0 (diff) | |
parent | 48cb18e5c419ddd23d9badcfe4e9df7bde1979b2 (diff) | |
download | protobuf-94d55e529204cc8575bf1070dc1e2375dbc8a4c5.tar.gz protobuf-94d55e529204cc8575bf1070dc1e2375dbc8a4c5.tar.bz2 protobuf-94d55e529204cc8575bf1070dc1e2375dbc8a4c5.zip |
Merge branch '3.6.x' into merge-3-6-x
Diffstat (limited to 'php/ext/google/protobuf/message.c')
-rw-r--r-- | php/ext/google/protobuf/message.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c index 76d85ab0..0efe090d 100644 --- a/php/ext/google/protobuf/message.c +++ b/php/ext/google/protobuf/message.c @@ -223,13 +223,7 @@ static zval* message_get_property_ptr_ptr(zval* object, zval* member, int type, } static HashTable* message_get_properties(zval* object TSRMLS_DC) { - // User cannot get property directly (e.g., $a = $m->a) - zend_error(E_USER_ERROR, "Cannot access private properties."); -#if PHP_MAJOR_VERSION < 7 - return zend_std_get_properties(object TSRMLS_CC); -#else - return zend_std_get_properties(object); -#endif + return NULL; } static HashTable* message_get_gc(zval* object, CACHED_VALUE** table, @@ -871,7 +865,11 @@ PHP_PROTO_INIT_ENUMCLASS_START("Google\\Protobuf\\Field\\Cardinality", zend_declare_class_constant_long(field_cardinality_type, "CARDINALITY_REPEATED", 20, 3 TSRMLS_CC); const char *alias = "Google\\Protobuf\\Field_Cardinality"; +#if PHP_VERSION_ID < 70300 zend_register_class_alias_ex(alias, strlen(alias), field_cardinality_type TSRMLS_CC); +#else + zend_register_class_alias_ex(alias, strlen(alias), field_cardinality_type, 1); +#endif PHP_PROTO_INIT_ENUMCLASS_END // ----------------------------------------------------------------------------- @@ -926,7 +924,11 @@ PHP_PROTO_INIT_ENUMCLASS_START("Google\\Protobuf\\Field\\Kind", zend_declare_class_constant_long(field_kind_type, "TYPE_SINT64", 11, 18 TSRMLS_CC); const char *alias = "Google\\Protobuf\\Field_Kind"; +#if PHP_VERSION_ID < 70300 zend_register_class_alias_ex(alias, strlen(alias), field_kind_type TSRMLS_CC); +#else + zend_register_class_alias_ex(alias, strlen(alias), field_kind_type, 1); +#endif PHP_PROTO_INIT_ENUMCLASS_END // ----------------------------------------------------------------------------- |