| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | public function __construct() { |
||
| 9 | global $ID; |
||
| 10 | parent::__construct(); |
||
| 11 | |||
| 12 | $parent = tpl_getparent($ID); |
||
| 13 | if(!$parent) { |
||
|
|
|||
| 14 | throw new \RuntimeException("No parent for back action"); |
||
| 15 | } |
||
| 16 | |||
| 17 | $this->id = $parent; |
||
| 18 | $this->params = array('do' => ''); |
||
| 19 | $this->accesskey = 'b'; |
||
| 20 | } |
||
| 21 | |||
| 23 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: