Summary | /admin/sqlshell.php fails on UPDATE query: Call to a member function fetch_array() on boolean |
Queue | Horde Framework Packages |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | 3rdpartybugs (at) object (dot) earth |
Created | 2016-01-06 (1845 days ago) |
Due | |
Updated | 2017-10-20 (1192 days ago) |
Assigned | 2016-01-06 (1845 days ago) |
Resolved | 2016-01-06 (1845 days ago) |
Milestone | |
Patch | No |
commit 3b986c3d83fcea9c7c800232897c962810d38315
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed, 06 Jan 2016 13:37:18 -0500
Bug: 14216Attempt to report back meaningful results.For non-select statements, report back number of rows affected.
M admin/sqlshell.php
https://github.com/horde/base/commit/3b986c3d83fcea9c7c800232897c962810d38315
commit 157c4adcbd56117142c2fba88bb10d775e62f9c1
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Jan 6 13:35:21 2016 -0500
Bug: 14216Attempt to report back meaningful results.For non-select statements, report back number of rows affected.
horde/admin/sqlshell.php | 47 +++++++++++++++++++++++++++++++++++++++++----
1 files changed, 42 insertions(+), 5 deletions(-)
http://github.com/horde/horde/commit/157c4adcbd56117142c2fba88bb10d775e62f9c1
commit b754ca323b06f94892b20e285a04cfceaac57b2c
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Jan 6 13:35:21 2016 -0500
Bug: 14216Attempt to report back meaningful results.For non-select statements, report back number of rows affected.
horde/admin/sqlshell.php | 47 +++++++++++++++++++++++++++++++++++++++++----
1 files changed, 42 insertions(+), 5 deletions(-)
http://github.com/horde/horde/commit/b754ca323b06f94892b20e285a04cfceaac57b2c
Horde_Db package is structured. The best solution, IMO, would be to
attempt to simply sniff out the type of query being performed and call
the appropriate method. I should note that your UPDATE statement most
likely did work. The issue is in the code that reports the result set
back to the sqlshell controller.
Assigned to Michael Rubinsky
State ⇒ Assigned
obviously assumes the SQL is a SELECT. I see that the execute method
is deprecated, so we need to check the return type before moving on.
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ /admin/sqlshell.php fails on UPDATE query: Call to a member function fetch_array() on boolean
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Administration->Configuration->SQL Shell
Fails with an exception upon UPDATE-query execution.
Example query:
UPDATE imp_sentmail SET sentmail_who=1 WHERE sentmail_who=1
Log error mesage:
HORDE: [horde] Call to a member function fetch_array() on boolean [pid
12311 on line 50 of "/usr/share/php/Horde/Db/Adapter/Mysqli/Result.php"]
Webinterface exception message:
ErrorException Object
(
[message:protected] => Call to a member function fetch_array() on boolean
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /usr/share/php/Horde/Db/Adapter/Mysqli/Result.php
[line:protected] => 50
[trace:Exception:private] => Array
(
[0] => Array
(
[function] => catchFatalError
[class] => Horde_ErrorHandler
[type] => ::
[args] => Array
(
)
)
)
[previous:Exception:private] =>
[severity:protected] => 1
[logged] => 1
)