[
https://issues.apache.org/jira/browse/SHINDIG-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606287#action_12606287
]
Karsten Beyer commented on SHINDIG-392:
---------------------------------------
if (! empty($jsonIdSpec) && in_array((string)$jsonIdSpec, idSpec::$types)) {
$idSpecEnum = (string)$jsonIdSpec;
} elseif (!empty($jsonIdSpec)) {
$idSpecEnum = 'USER_IDS';
} else {
throw new Exception("The json request had a bad idSpec");
}
return new IdSpec($jsonIdSpec, $idSpecEnum);
i think that the !empty in the first elseif statement is wrong. First of all it
makes no sense as now only an empty IdSpec leads to the exception, while an
arbitrary string will be converted to USER_IDS (arbitrary = not in the types
array).
Aside from that it makes the compliance test fail...
Removing the "!" makes it work as it should.
> bug in idSpec.php that doesnt allow array() of user ids
> -------------------------------------------------------
>
> Key: SHINDIG-392
> URL: https://issues.apache.org/jira/browse/SHINDIG-392
> Project: Shindig
> Issue Type: Bug
> Components: Common Components (PHP)
> Reporter: bruno rovagnati
> Assignee: Chris Chabot
> Attachments: idSpec_USER_ID.patch
>
>
> if an array of id (or a single id) is sent for a IdSpec, php will rejected as
> invalid
> ps: this applies to JSON wired stuff
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.