#1 Relationship plugin PHP Warning

open
nobody
None
5
2009-02-11
2009-02-11
Jonathan Daley
No

Simple warning fixed when adding a new contact:

addressbook/plugins/Relationships>svn diff -x -w -c7833
Index: Relationships.plugin.php
===================================================================
72d71
< $id = $contact->contact['id'];
76c75
< if(!empty($id))
---
> if(!empty($contact->contact['id']))
77a77
> $id = $contact->contact['id'];

So, the final version looks like this:
$i=0;
// list existing relationships if not a new/added contact
if(!empty($contact->contact['id']))
{
$id = $contact->contact['id'];

Discussion