]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #5106 from tobiasd/20180521-en
[friendica.git] / include / items.php
index 83aa82c940cc8d2c988b4f2009b924f397b044ed..c04bef01c3de0ecb72a8e0c98d52d303f60313e1 100644 (file)
@@ -29,7 +29,7 @@ function add_page_info_data($data, $no_photos = false) {
        // It maybe is a rich content, but if it does have everything that a link has,
        // then treat it that way
        if (($data["type"] == "rich") && is_string($data["title"]) &&
-               is_string($data["text"]) && (sizeof($data["images"]) > 0)) {
+               is_string($data["text"]) && !empty($data["images"])) {
                $data["type"] = "link";
        }
 
@@ -63,7 +63,7 @@ function add_page_info_data($data, $no_photos = false) {
                $text .= " title='".$data["title"]."'";
        }
 
-       if (sizeof($data["images"]) > 0) {
+       if (!empty($data["images"])) {
                $preview = str_replace(["[", "]"], ["[", "]"], htmlentities($data["images"][0]["src"], ENT_QUOTES, 'UTF-8', false));
                // if the preview picture is larger than 500 pixels then show it in a larger mode
                // But only, if the picture isn't higher than large (To prevent huge posts)
@@ -228,7 +228,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
  *
  * @TODO find proper type-hints
  */
-function consume_feed($xml, $importer, &$contact, &$hub, $datedir = 0, $pass = 0) {
+function consume_feed($xml, $importer, $contact, &$hub, $datedir = 0, $pass = 0) {
        if ($contact['network'] === NETWORK_OSTATUS) {
                if ($pass < 2) {
                        // Test - remove before flight