| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function loadFromFlexiBee($id = null) { |
||
| 36 | if (strstr($id, 'code:')) { //Dirty Hack ⚠ Error 400: Entita 'Report' neobsahuje kód nebo ho nelze použít jako ID (není unikátní) |
||
| 37 | $candidates = $this->getColumnsFromFlexibee(['id', 'kod'], null, 'kod'); |
||
|
|
|||
| 38 | if (array_key_exists(\FlexiPeeHP\FlexiBeeRO::uncode($id), $candidates)) { |
||
| 39 | $id = intval($candidates[\FlexiPeeHP\FlexiBeeRO::uncode($id)]['id']); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | return parent::loadFromFlexiBee($id); |
||
| 43 | } |
||
| 44 | |||
| 57 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: