OracleBufferedStatement failure after CakePHP 3.7
Closed this issue · 2 comments
ctgraham commented
CakePHP 3.7 refactored BufferedStatement
to use StatementInterface
instead of StatementDecorator
:
cakephp/cakephp@35dcf38
This removes the protected variable _statement
in favor of statement
:
https://github.com/cakephp/cakephp/blob/1f6fd21ca27ffc88fa88506a400b94a809e29254/src/Database/Statement/BufferedStatement.php#L43
As a result, recent calls to fetch()
will fail with:
Exception: Call to a member function fetch() on null in [vendor/cakedc/cakephp-oracle-driver/src/Database/Statement/OracleBufferedStatement.php, line 36]
2019-03-06 18:24:03 Error: [Error] Call to a member function fetch() on null in vendor/cakedc/cakephp-oracle-driver/src/Database/Statement/OracleBufferedStatement.php on line 36
Stack Trace:
#0 vendor/cakedc/cakephp-oracle-driver/src/Database/Statement/OracleStatement.php(98): CakeDC\OracleDriver\Database\Statement\OracleBufferedStatement->fetch('num')
#1 vendor/cakephp/cakephp/src/Database/Schema/Collection.php(65): CakeDC\OracleDriver\Database\Statement\OracleStatement->fetch()
#2 vendor/cakephp/bake/src/Shell/Task/ModelTask.php(1093): Cake\Database\Schema\Collection->listTables()
#3 vendor/cakephp/bake/src/Shell/Task/ModelTask.php(1046): Bake\Shell\Task\ModelTask->_getAllTables()
#4 vendor/cakephp/bake/src/Shell/Task/ModelTask.php(1061): Bake\Shell\Task\ModelTask->listAll()
#5 vendor/cakephp/bake/src/Shell/BakeShell.php(258): Bake\Shell\Task\ModelTask->listUnskipped()
#6 vendor/cakephp/cakephp/src/Console/Shell.php(518): Bake\Shell\BakeShell->all()
#7 vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(230): Cake\Console\Shell->runCommand(Array, true, Array)
#8 vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(182): Cake\Console\ShellDispatcher->_dispatch(Array)
#9 vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(128): Cake\Console\ShellDispatcher->dispatch(Array)
#10 bin/cake.php(33): Cake\Console\ShellDispatcher::run(Array)
#11 {main}
Code at fault is minimally:
and
jmbIFR commented
Issue #33 resolve cakePHP 3.7 compatibility
Can you test my fork at https://github.com/jmbIFR/cakephp-oracle-driver ?
skie commented
applied in 5.x branch