Ostico / PhpOrient

PhpOrient - Official Php driver based on the binary protocol of OrientDB.
Other
68 stars 37 forks source link

Undefined index: oClass #74

Closed sameer-shelavale closed 7 years ago

sameer-shelavale commented 8 years ago

hi, I am getting this error

Notice: Undefined index: oClass

/home/production/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php:515 in PhpOrient\Protocols\Binary\Abstracts\Operation->_readRecord /home/production/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php:609 in PhpOrient\Protocols\Binary\Abstracts\Operation->_read_sync /home/production/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Operations/Command.php:191 in PhpOrient\Protocols\Binary\Operations\Command->_read /home/production/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php:287 in PhpOrient\Protocols\Binary\Abstracts\Operation->getResponse /home/production/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/SocketTransport.php:163 in PhpOrient\Protocols\Binary\SocketTransport->execute /home/production/vendor/ostico/phporient/src/PhpOrient/PhpOrient.php:297 in PhpOrient\PhpOrient->query /home/production/public_html/include/orientdb/orientdb_functions.php:867 in orientdb_add_postrec /home/production/rabbitmq/processors/UpsertElasticSearchRecord.php:613 in \RabbitMQ\Processor\UpsertElasticSearchRecord->process /home/production/rabbitmq/primary_worker.php:88 in {closure} : in call_user_func /home/production/vendor/videlalvaro/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php:570 in PhpAmqpLib\Channel\AMQPChannel->basic_deliver : in call_user_func /home/production/vendor/videlalvaro/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php:98 in PhpAmqpLib\Channel\AbstractChannel->dispatch /home/production/vendor/videlalvaro/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php:238 in PhpAmqpLib\Channel\AbstractChannel->wait /home/production/rabbitmq/primary_worker.php:124 in

line 867 in orientdb_functions.php is $res = $client->query("select classes[name='PostRecord'].defaultClusterId from 0:1", -1);

How to resolve the notice?

Ostico commented 8 years ago

@sameer-shelavale do you experienced some troubles after the Notice?

sameer-shelavale commented 8 years ago

Hi, It was happening to client's live server only and I didn't have access to the live db to check if that warning was leading to anomalies. Also, it was happening arbitrarily and not everytime, rather we also could not reproduce the bug on development machines.

However I had edited few lines of code in Operation.php to eliminate the notice. I am creating a PR of that piece of code in few minutes

sameer-shelavale commented 8 years ago

please check the PR at https://github.com/Ostico/PhpOrient/pull/79