6.0.0-beta1
9/24/25

[#5168] Undefined offset: 1 in Driver.php on line 925
Summary Undefined offset: 1 in Driver.php on line 925
Queue Turba
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners selsky (at) columbia (dot) edu
Requester jokot3 (at) gmail (dot) com
Created 03/28/2007 (6755 days ago)
Due
Updated 04/05/2007 (6747 days ago)
Assigned 03/28/2007 (6755 days ago)
Resolved 04/05/2007 (6747 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/05/2007 04:42:31 PM Matt Selsky Assigned to Matt Selsky
State ⇒ Resolved
 
04/05/2007 08:10:13 AM jokot3 (at) gmail (dot) com Comment #9 Reply to this comment
Ok tested today, it works here
03/30/2007 04:50:32 AM Chuck Hagenbuch Deleted Original Message
 
03/30/2007 04:49:41 AM Chuck Hagenbuch Comment #7 Reply to this comment
Sounds perfectly reasonable to me. I had the same concerns about the 
submitted patch.
03/29/2007 11:20:21 PM Matt Selsky Comment #6 Reply to this comment
The patch proposed on the mailing list is definitely wrong since 'N' 
is a multi-valued field, not a single value.



My reading of http://www.imc.org/pdi/vcard-21.txt says that neither 
first name nor last name are required in the 'N' field.  Any problem 
with my updating Driver.php to reflect that?
03/29/2007 04:49:34 PM Matt Selsky Comment #5
New Attachment: simple.vcf Download
Reply to this comment
Single vCard that reproduces the problem...
03/29/2007 09:32:43 AM jokot3 (at) gmail (dot) com Comment #4
New Attachment: liste2.vcf Download
Reply to this comment
You should be able to reduce it to the bare minimum vCard with a
name, right? So just replace the name with a bogus one...
I'm trying since an hour, for the moment I can't reproduce it with
modified data... I keep trying.
Ok, here it is
03/29/2007 09:14:28 AM jokot3 (at) gmail (dot) com Comment #3 Reply to this comment
You should be able to reduce it to the bare minimum vCard with a
name, right? So just replace the name with a bogus one...
I'm trying since an hour, for the moment I can't reproduce it with 
modified data... I keep trying.
03/28/2007 09:50:33 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
You should be able to reduce it to the bare minimum vCard with a name, 
right? So just replace the name with a bogus one...
03/28/2007 11:27:01 AM jokot3 (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: turba_driver_patch
Queue ⇒ Turba
Summary ⇒ Undefined offset: 1 in Driver.php on line 925
Type ⇒ Bug
Reply to this comment
When adding a personnal vcard file (containing around 15 entries), it 
produce the error :

Notice: Undefined offset: 1 in 
/srv/www/horde-cvs/horde/turba/lib/Driver.php on line 925

already mentionned there : 
http://lists.horde.org/archives/dev/Week-of-Mon-20051003/018643.html

The guy provides a patch but didn't post a bug ticket, there it is :)



line 925 and around :

              case 'N':

                  $name = $item['values'];

                  $hash['lastname'] = $name[VCARD_N_FAMILY];

925 -->     $hash['firstname'] = $name[VCARD_N_GIVEN];

                  if (!empty($name[VCARD_N_ADDL])) {



I can't provide the vcard file causing the error, it contains really 
personnal data (as any vcard...), but I'm trying to produce one which 
cause the same notice, if needed.



Patch attached.



greets.

Saved Queries