Menu

#4471 (ok 4.2.6) Undefined index warning with referenced column.

4.2.4
fixed
None
1
2015-02-23
2014-06-22
No

Steps to reproduce:

  • Go to sakila > actor table.
  • Click in structure tab.
  • Click on 'change' link of 'actor_id' column.
  • Click on any other tab such as Browse tab.
  • An undefined index warning message at the bottom of the resulting page.

    Notice in ./libraries/relation.lib.php#1603
    Undefined index: actor_id
    
    Backtrace
    
    ./libraries/tbl_columns_definition_form.inc.php#137: PMA_checkChildForeignReferences(
    string 'sakila',
    string 'actor',
    string 'actor_id',
    )
    ./libraries/structure.lib.php#2309: include(./libraries/tbl_columns_definition_form.inc.php)
    ./tbl_structure.php#45: PMA_displayHtmlForColumnChange(
    string 'sakila',
    string 'actor',
    NULL,
    string 'tbl_structure.php',
    )
    

This happens for columns which are referenced by some other table. For e.g.

  • sakila > address > address_id
  • sakila > category > category_id

Discussion

  • Hugues Peccatte

    Hugues Peccatte - 2014-06-23

    Hi,
    Did you really get this error on a 4.2.x please?
    I couldn't reproduce it on QA_4_2, only on master.

    I'll wait for your answer to send a patch.
    Thanks.

     
  • Chirayu Chiripal

    Hi,
    Yes I can reproduce it on QA_4_2, STABLE and master branch.
    Thanks.

     
  • Hugues Peccatte

    Hugues Peccatte - 2014-06-24

    Hi,
    I sent this PR: https://github.com/phpmyadmin/phpmyadmin/pull/1254
    Please confirm this is ok.
    Thanks.

     
  • Chirayu Chiripal

    Perfect!
    Thanks.

     
  • Marc Delisle

    Marc Delisle - 2014-06-28
    • assigned_to: Hugues Peccatte
     
  • Hugues Peccatte

    Hugues Peccatte - 2014-07-14
    • summary: Undefined index warning with referenced column. --> (ok 4.2.6) Undefined index warning with referenced column.
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2014-07-18
    • Status: resolved --> fixed