User tests: Successful: Unsuccessful:
Removal of redundant code.
Second condition is always true because is_object($data) is already true at this point.
Code review
| Status | New | ⇒ | Pending |
| Category | ⇒ | Front End Plugins |
| Title |
|
||||||
I read the whole method.
The fact is, that it cannot pass the first test is_object and then fail is_null
The check for is_null is totally redundant and impossible to get to, because to get to the second condition (to test for null) it first has to succeed to be an object - and if its an object its NEVER going to be a null as the result of is_object(null) is false.
That's what I mean can you fix the other if statement too please?
yup
| Labels |
Added:
?
|
||
Done.
I have tested this item
Applied patch, saw the code change and understood it should work fine. But where is it called?
I have tested this item
Code is applied and conditions cleaned up
| Status | Pending | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-17 10:34:10 |
| Closed_By | ⇒ | HLeithner |
Did you see the elseif 4 lines above?