From 703cd8e11c8d34283d4c8bf869c61866e8211c9d Mon Sep 17 00:00:00 2001 From: Ryan Gordon Date: Mon, 19 Jun 2017 18:15:49 -0700 Subject: Switch to addEnumType to fix fatal error (#3225) * Switch to addEnumType to fix fatal error * Fixing more cases of HHVM incompatibility * Updating tests to be hhvm compatible * Fixing tests * Fixing merge * Don't use call_user_func, should hopefully fix tests * Fixing spelling * Fixing another misspelling in a test * Fixing placement of append and kvUpdate functions * Actually fix function helpers * Remove double addEnumType. How did this ever work? * Fixing a couple more tests * Only use the setter if the return value isn't an object --- php/src/Google/Protobuf/Internal/FileDescriptor.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'php/src/Google/Protobuf/Internal/FileDescriptor.php') diff --git a/php/src/Google/Protobuf/Internal/FileDescriptor.php b/php/src/Google/Protobuf/Internal/FileDescriptor.php index 14716390..038da38c 100644 --- a/php/src/Google/Protobuf/Internal/FileDescriptor.php +++ b/php/src/Google/Protobuf/Internal/FileDescriptor.php @@ -78,12 +78,11 @@ class FileDescriptor $message_proto, $proto, "")); } foreach ($proto->getEnumType() as $enum_proto) { - $file->getEnumType()[] = - $file->addEnumType( - EnumDescriptor::buildFromProto( - $enum_proto, - $proto, - "")); + $file->addEnumType( + EnumDescriptor::buildFromProto( + $enum_proto, + $proto, + "")); } return $file; } -- cgit v1.2.3