| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function getThumbnail() |
||
| 35 | { |
||
| 36 | $url = $this->_getMixcloudUrl(); |
||
| 37 | if ($url) { |
||
|
|
|||
| 38 | $html = Ajde_Http_Curl::get($url); |
||
| 39 | $matches = []; |
||
| 40 | preg_match('%og:image\" content=\"(.+?)\"%', $html, $matches); |
||
| 41 | // we get .png, we want .jpg |
||
| 42 | if (isset($matches[1])) { |
||
| 43 | return $matches[1]; |
||
| 44 | } |
||
| 45 | |||
| 46 | return; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
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: