#4115 (ok 4.1.0-rc2) PHP errors when grid editing a query

Latest_Git
fixed
nobody
None
1
2013-12-12
2013-10-03
Michal Čihař
No

What I did:

  • used grid editing on record in pma_history table
  • inline edit that query to change ID

Following errors happen:

Warning in ./libraries/dbi/DBIMysqli.class.php#617
mysqli_fetch_fields() expects parameter 1 to be mysqli_result, boolean given

Backtrace

./libraries/dbi/DBIMysqli.class.php#617: mysqli_fetch_fields(boolean true)
./libraries/DatabaseInterface.class.php#2357: PMA_DBI_Mysqli->getFieldsMeta(boolean true)
./libraries/sql.lib.php#2027: PMA_DatabaseInterface->getFieldsMeta(boolean true)
./libraries/sql.lib.php#2220: PMA_sendQueryResponseForResultsReturned(
boolean true,
boolean false,
array,
string 'pma',
string 'pma_history',
NULL,
NULL,
NULL,
object,
string 'tbl_structure.php',
string './themes/pmahomme/img/',
string '',
integer 1,
integer 1,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
NULL,
NULL,
NULL,
NULL,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
)
./libraries/sql.lib.php#2314: PMA_sendQueryResponse(
integer 1,
integer 1,
boolean false,
string 'pma',
string 'pma_history',
NULL,
array,
object,
NULL,
boolean true,
boolean false,
NULL,
NULL,
NULL,
string 'tbl_structure.php',
string './themes/pmahomme/img/',
string '',
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
NULL,
NULL,
NULL,
NULL,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
)
./import.php#616: PMA_executeQueryAndSendQueryResponse(
array,
boolean false,
string 'pma',
string 'pma_history',
NULL,
NULL,
NULL,
boolean false,
NULL,
NULL,
NULL,
NULL,
string 'tbl_structure.php',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
NULL,
)

Warning in ./libraries/sql.lib.php#313
Invalid argument supplied for foreach()

Backtrace

./libraries/sql.lib.php#2051: PMA_resultSetContainsUniqueKey(
string 'pma',
string 'pma_history',
boolean false,
)
./libraries/sql.lib.php#2220: PMA_sendQueryResponseForResultsReturned(
boolean true,
boolean false,
array,
string 'pma',
string 'pma_history',
NULL,
NULL,
NULL,
object,
string 'tbl_structure.php',
string './themes/pmahomme/img/',
string '',
integer 1,
integer 1,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
NULL,
NULL,
NULL,
NULL,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
)
./libraries/sql.lib.php#2314: PMA_sendQueryResponse(
integer 1,
integer 1,
boolean false,
string 'pma',
string 'pma_history',
NULL,
array,
object,
NULL,
boolean true,
boolean false,
NULL,
NULL,
NULL,
string 'tbl_structure.php',
string './themes/pmahomme/img/',
string '',
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
NULL,
NULL,
NULL,
NULL,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
)
./import.php#616: PMA_executeQueryAndSendQueryResponse(
array,
boolean false,
string 'pma',
string 'pma_history',
NULL,
NULL,
NULL,
boolean false,
NULL,
NULL,
NULL,
NULL,
string 'tbl_structure.php',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'UPDATE pma.pma_history SET sqlquery = \'SELECT * FROM bazeee_bbb \' WHERE pma_history.id = 62',
NULL,
NULL,
)

Discussion

  • Michal Čihař
    Michal Čihař
    2013-10-03

    To me it looks like the inline submitted query does not validate whether it fails and tries to display results regardless.

     
  • Marc Delisle
    Marc Delisle
    2013-10-05

    You're talking about grid editing, right?

     
  • Michal Čihař
    Michal Čihař
    2013-10-07

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,6 @@
     What I did:
    
    -- inline edit record in pma_history table
    +- used grid editing on record in pma_history table
     - inline edit that query to change ID
    
     Following errors happen:
    
     
  • Michal Čihař
    Michal Čihař
    2013-10-07

    Yes

     
  • Marc Delisle
    Marc Delisle
    2013-11-17

    • summary: PHP errors when inline editing query --> PHP errors when grid editing a query
     
  • Marc Delisle
    Marc Delisle
    2013-11-17

    Michal,
    are you just grid editing the id column of pma_history?

     
  • Michal Čihař
    Michal Čihař
    2013-11-18

    Exactly

     
  • Marc Delisle
    Marc Delisle
    2013-11-19

    Cannot reproduce. You are just changing the id? and do you change it for an existing value or a new value?

     
  • Michal Čihař
    Michal Čihař
    2013-11-26

    • summary: PHP errors when grid editing a query --> (ok 4.1.0-rc2) PHP errors when grid editing a query
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Michal Čihař
    Michal Čihař
    2013-11-26

    Indeed looks okay now, thanks for fixing this.

     
  • Marc Delisle
    Marc Delisle
    2013-12-12

    • Status: resolved --> fixed