Skip to content

Commit 158d8ac

Browse files
Change 'getLabel is deprecated' to E_USER_DEPRECATED
Some users configure their setup to treat E_USER_WARNING as an error but not E_USER_DEPRECATED. PiperOrigin-RevId: 760631116
1 parent c225da7 commit 158d8ac

File tree

1 file changed

+1
-1
lines changed
  • php/ext/google/protobuf

1 file changed

+1
-1
lines changed

php/ext/google/protobuf/def.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ PHP_METHOD(FieldDescriptor, getNumber) {
395395
* Returns the label of this field as an integer.
396396
*/
397397
PHP_METHOD(FieldDescriptor, getLabel) {
398-
zend_error(E_USER_WARNING,
398+
zend_error(E_USER_DEPRECATED,
399399
"getLabel is deprecated. Use isRequired or isRepeated instead.\n");
400400
FieldDescriptor* intern = (FieldDescriptor*)Z_OBJ_P(getThis());
401401
RETURN_LONG(upb_FieldDef_Label(intern->fielddef));

0 commit comments

Comments
 (0)