Jump to content


Mike

Member Since 28 Jun 2015
Offline Last Active Private
-----

Topics I've Started

forms with nonexistent primary key

28 June 2015 - 04:53 PM

Hello, i am new in this forum and library and was reading about it and doing some tests.
 
While doing those tests i've found a "bug" (to call it something) that consists in when you pass a primary key that does not exists in the table, the system allows to work with it, the result are incorrect forms and data list show, and a system malfunction when editing a field (nothing important, just doesn't work)

 

Listing:

Editing:

I think the solution is very simple, but as yet i don't know how the library works completely i prefer to ask here if there is any method to check this in the main file.

 

Extra info (Lines and stuff):

  • Grocery_CRUD.php -> Line: 1832 ( protected function showEditForm($state_info) )
  • Grocery_CRUD.php -> Line: 1863 ( protected function showReadForm($state_info) )
  • Var to check if exists in table: $state_info->primary_key

Greetings!