getControllerArguments() appears to allow for the 'source' of a resource argument to not be set:
// Map source data to arguments.
$arguments = array();
if (isset($controller['args'])) {
foreach ($controller['args'] as $i => $info) {
// Fill in argument from source
if (isset($info['source'])) {
However, checkNumberOfArguments() does not:
if (isset($resource_operation['args'])) {
foreach ($resource_operation['args'] as $argument) {
if (is_array($argument['source']) && isset($argument['source']['path'])) {
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1931080-5.services.checkNumberOfArguments-source-isset.patch | 675 bytes | joachim |
| #2 | 1931080.services.checkNumberOfArguments-source-isset.patch | 671 bytes | joachim |
Comments
Comment #1
joachim commentedFor a use case for this, see #1931082: add an easier way to specify fixed values for resource arguments .
Comment #2
joachim commentedComment #4
joachim commentedArgh, this breaks things!
Comment #5
joachim commentedThat'll teach me to frankencode!!!
Comment #6
marcingy commentedLooks good thanks :)
Comment #7
kylebrowning commented