Summary | Need to replace sscanf() in Turba_Driver |
Queue | Turba |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | chuck (at) horde (dot) org |
Requester | mrubinsk (at) horde (dot) org |
Created | 07/26/2007 (6589 days ago) |
Due | |
Updated | 08/04/2007 (6580 days ago) |
Assigned | 07/30/2007 (6585 days ago) |
Resolved | 08/04/2007 (6580 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
first in the
'fields'
the positioned params, so never mind ;)
Guess we can close this then with a note in the sources.php file?
But i'm still getting some strange behaviour with lists...will
investigate more.
would work with positioned parameters already. So maybe the answer is
that positioned parameters simply aren't supported here?
post, as a kind of hint in that direction ;)
first in the
'fields'
regex, we'd still have to "manually" ensure the correct ordering of
the fields in the fields array, no?
1) We use the 'format' string in other places (as parameters to
vsprintf for example)
2) The format string is also used in Horde_Form_Action_updatefield,
which specifically explodes the string on '%s' ... and we can't
change this without breaking bc.
would work with positioned parameters already. So maybe the answer is
that positioned parameters simply aren't supported here?
The existing code works fine as long as we don't use positioned
parameters in the format string -' %2$s %1$s' for example. With just
' %s %s' every thing is fine, but we need to put the field we are
using to store the contact list name first in the 'fields' array...and
off the top of my head, even if we were able to use a regex, we'd
still have to "manually" ensure the correct ordering of the fields in
the fields array, no?
1) We use the 'format' string in other places (as parameters to
vsprintf for example)
2) The format string is also used in Horde_Form_Action_updatefield,
which specifically explodes the string on '%s' ... and we can't change
this without breaking bc.
State ⇒ Feedback
printf format string to a regexp? That seems to be the simplest thing
to me, and probably allows much more flexible fields as well.
http://bugs.php.net/bug.php?id=42107
Priority ⇒ 2. Medium
State ⇒
Queue ⇒ Turba
Summary ⇒ Need to replace sscanf() in Turba_Driver
Type ⇒ Bug
in Turba_Driver::toDriverKeys to some other inplementation.
The bug causes problems when using positioned parameters in the format
string (inserts extra array elements in the results as well as
confusing the order of the results in some cases) thus causing the
composite fields to break....and possibly preventing the creation of
new contact lists.
Example:
$test = sscanf('hello world, '%2$s %1$s');
print_r($test);
produces:
Array
(
[0] =>
[1] =>
[3] => hello
[2] => world
)