User tests: Successful: Unsuccessful:
you can't just append a type and hope Joomla converts to that type haha - fake security, the method call doesn't have this additional param
code review
Status | New | ⇒ | Pending |
This is set, you linked to get
Oh ... I need sleep. For set you are right.
Labels |
Added:
?
|
No idea - but it is clear what was there before was clearly wrong and needs addressing. If this PR is incorrect, it doesnt change the fact that the current code is wrong :)
Tried to look at it again but unsure what to do :(. I don't know why we need to attempt to get data from $this->input
and if it does not exist, try to get it from $this->input->get
?
Isn't $this->input contains data from both POST and GET already? Or there is something special here :( ? In ArticlesController for example, we do not need to use $this->input->get
at all. See https://github.com/joomla/joomla-cms/blob/4.0-dev/api/components/com_content/src/Controller/ArticlesController.php#L48-L79 .
Honestly right now I can’t remember why this would be either. Pretty sure we just want to be checking GET. Will look again tomorrow with a fresh pair of eyes
However, for shorter code, using just $this->input->get instead of $this->input->get->get could work, too
It can work but would allow query overriding which would be wrong. For the API we generally should be fairly strict about the data sources.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-15 12:30:18 |
Closed_By | ⇒ | PhilETaylor | |
Labels |
Added:
?
Removed: ? |
Closing as no possibility of being merged.
@PhilETaylor Not sure if you are right here. See https://github.com/joomla-framework/input/blob/2.0-dev/src/Input.php#L166 .