Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
282 | public function getCurrentTag() |
||
283 | { |
||
284 | $segment = $this->getCurrentTagURLSegment(); |
||
285 | if (!$segment) { |
||
286 | return null; |
||
287 | } |
||
288 | |||
289 | /** @var BlogTag $tag */ |
||
290 | $tag = $this |
||
291 | ->data() |
||
292 | ->Tags(false)// Show "no results" instead of "404" |
||
293 | ->find('URLSegment', $segment); |
||
294 | return $tag; |
||
295 | } |
||
296 | |||
653 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: