Welcome, Guest
Username: Password: Remember me

TOPIC: integrityRestrict, initialize editLink with null

integrityRestrict, initialize editLink with null 08 Jul 2018 11:22 #15602

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Hi admin,

In the model/item class there is a function integrityRestrict.
This function will give a warning when the $editlink (variable 5) is not initialized.
Possible solutions: init the function parameter with null or use isset() in the function itself.

I was running into this when I was using a table for prices, which were used as FK on two other tables.
In the model, one FK model integrityRestrict was called with an editlink, and one without (I do not know why)
I forked a controller and then called delete on the price model, this caused the warning to be seen.
Maybe not very visible, but I use an ajax call, causing the warning message to disrupt page processing.
The administrator has disabled public write access.
Time to create page: 0.077 seconds

Get Started