We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
message Person { required bytes name = 1; required uint32 age = 2; }
require 'person.proto.php'; $info = [ 'fake_name' => 'bryce', 'age' => 18 ]; var_dump($info); $person = new Person(); try { $person->setFrom($info); } catch (Exception $e) { } var_dump($info);
array(2) { 'fake_name' => string(5) "bryce" 'age' => int(18) } array(2) { 'fake_name' => class InvalidArgumentException#4 (8) { protected $message => string(23) "fake_name does not find" private $string => string(0) "" protected $code => int(0) protected $file => string(32) "/home/bryceliu/c/person/test.php" protected $line => int(10) private $trace => array(1) { [0] => array(6) { ... } } private $previous => NULL public $xdebug_message => string(279) " InvalidArgumentException: fake_name does not find in /home/bryceliu/c/person/test.php on line 10 Call Stack: 0.0002 223440 1. {main}() /home/bryceliu/c/person/test.php:0 0.0013 252648 2. ProtocolBuffersMessage->setFrom() /home/bryceliu/c/person/test.php:10 " } 'age' => int(18) } Segmentation fault
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When initialize a message with an invalid array, the first invalid key of the given array will be changed to an exception. Segmentation fault also.
Message definition
PHP test code
PHP output
The text was updated successfully, but these errors were encountered: