You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
PHP - The latest (main)
What operating system (Linux, Windows, ...) and version?
MacOSX
What runtime / compiler are you using (e.g., python version or gcc version)
Both native and protobuf c-extension for PHP
What did you do?
Calling setX($val) on a deprecated repeated field or map when the php extension is enabled results in a PHP error:
PHP Error: Call to a member function count() on array
This is because the c-extension seems to have different behavior than the PHP native library - the return type of GPBUtil::checkRepeatedField is of type RepeatedField in the native library, but in the extension it is array.
Generate a deprecated repeated field or map field in PHP
Make sure the protobuf.so c-extension is installed for PHP
Call the setter of the deprecated field
You'll get a PHP fatal error
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
PHP - The latest (main)
What operating system (Linux, Windows, ...) and version?
MacOSX
What runtime / compiler are you using (e.g., python version or gcc version)
Both native and protobuf c-extension for PHP
What did you do?
Calling
setX($val)
on a deprecated repeated field or map when the php extension is enabled results in a PHP error:This is because the c-extension seems to have different behavior than the PHP native library - the return type of
GPBUtil::checkRepeatedField
is of typeRepeatedField
in the native library, but in the extension it isarray
.The text was updated successfully, but these errors were encountered: