Skip Navigation
Remove

create_relationship error trigger

February 22, 2006 at 3:31 pm
By nwhite

The create_relationship function in admin_actions.php3 provides no indication of whether it succeeded or not, and is perfectly willing to create relationships where entity_a, entity_b, and relationship_type are values such as 0, null, or ''. There are thousands of relationships of type 0 in the relationship table on chicago (i removed the ones in the dev database). Instead of enforcing any strict rules, the trigger_error function is now called when create_relationship receives empty parameters. In this way, we can debug and fix whatever is creating invalid relationships and then consider whether the function itself should police the relationships it is creating.

Modified Files

  • admin_actions.php3

Add a comment

Name*
Comment*
The following fields are not to be filled out. Skip to Submit Button.
Not Comment
(This is here to trap robots. Don't put any text here.)
Not URL
(This is here to trap robots. Don't put any text here.)
Avoid
(This is here to trap robots. Don't put any text here.)