mirror of
https://github.com/friendica/friendica
synced 2025-04-26 07:50:15 +00:00
Changed:
- empty() is maybe superflous here, still I would prefer a code style that is written explicitly and not rely on "magic casting"
This commit is contained in:
parent
15d8341d9a
commit
7eefb9aed8
4 changed files with 7 additions and 7 deletions
|
@ -111,7 +111,7 @@ class BBCode
|
|||
|
||||
$picturedata = Images::getInfoFromURLCached($matches[1]);
|
||||
|
||||
if (!empty($picturedata)) {
|
||||
if ($picturedata) {
|
||||
if (($picturedata[0] >= 500) && ($picturedata[0] >= $picturedata[1])) {
|
||||
$post['image'] = $matches[1];
|
||||
} else {
|
||||
|
@ -320,7 +320,7 @@ class BBCode
|
|||
$post['text'] = trim(str_replace($pictures[0][0], '', $body));
|
||||
} else {
|
||||
$imgdata = Images::getInfoFromURLCached($pictures[0][1]);
|
||||
if (!empty($imgdata) && substr($imgdata['mime'], 0, 6) == 'image/') {
|
||||
if (($imgdata) && substr($imgdata['mime'], 0, 6) == 'image/') {
|
||||
$post['type'] = 'photo';
|
||||
$post['image'] = $pictures[0][1];
|
||||
$post['preview'] = $pictures[0][2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue