Exec web api request:
get http://my_joomla_domain/api/index.php/v1/content/articles
Authorization: Bearer SomeToken
Accept: application/vnd.api+json
Some parsable json with article data
<br />
<b>Warning</b>: Attempt to read property "status" on int in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on string in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on null in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
<br />
<b>Warning</b>: Attempt to read property "status" on null in <b>C:\xampp\htdocs\sipam\libraries\src\Application\CMSApplication.php</b> on line <b>830</b><br />
{"links":{
...
}}
The warnings (I assume generated by php) - should not be written to the response.
The warnings belong to the folowing line of code:
foreach ($authorisations as $authorisation) {
if ((int) $authorisation->status & $denied_states) {
...
Labels |
Added:
No Code Attached Yet
|
Version 4.2.9
Before reporting any issue please make sure that you are running the current release as your problem might already have been resolved.
The issue seems to be caused by my own plugin somehow - but that is not my problem.
Warnings should never appear there...
Warnings could appear in the document like:
{
"data": [
//what ever
],
"warnings": [
{
"text": "something went wrong...",
location: "..."
}
]
}
I actually set the "result" property while processing the "onUserAuthorisation" event. This seems to be not used by other plugins - therefore the result is usually []
... - we do not enter the loop
The spec/doc says it should return "null" or JAuthenticationResponse
. JAuthenticationResponse->status
is of type string
- so this code is bad...
The actual problem was / is that I used the non-legacy plugin api (Event
- based).
And I called:
$event->setArgument('result', $result);
where $result
is actually a JAuthenticationResponse
.
Now triggerEvent
simply returned that non-array object. See:
This caused that we were not iterating over authorisations - but over fields of an JAuthenticationResponse:
foreach ($authorisations as $authorisation) {
if ((int) $authorisation->status & $denied_states) {
...
Labels |
Added:
bug
|
on what joomla version ?