aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src/Google/Protobuf/Internal/FileDescriptor.php
diff options
context:
space:
mode:
authorGravatar Ryan Gordon <ryan@quizlet.com>2017-06-19 18:15:49 -0700
committerGravatar Paul Yang <TeBoring@users.noreply.github.com>2017-06-19 18:15:49 -0700
commit703cd8e11c8d34283d4c8bf869c61866e8211c9d (patch)
treec0b767f176d16e6ccfea69ad6f53d6d375f48933 /php/src/Google/Protobuf/Internal/FileDescriptor.php
parent13255889820dbd56f1574d9730465ca834c22bd2 (diff)
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
Diffstat (limited to 'php/src/Google/Protobuf/Internal/FileDescriptor.php')
-rw-r--r--php/src/Google/Protobuf/Internal/FileDescriptor.php11
1 files changed, 5 insertions, 6 deletions
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;
}