Browse Source

Merge pull request #4621 from annando/not-null

Avoid storing "null" values
pull/4623/head
Hypolite Petovan 4 years ago
committed by GitHub
parent
commit
e970bbdca8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/Protocol/DFRN.php
  2. 2
      src/Protocol/PortableContact.php

4
src/Protocol/DFRN.php

@ -2079,8 +2079,8 @@ class DFRN
return false;
}
$fields = ['title' => $item["title"], 'body' => $item["body"],
'tag' => $item["tag"], 'changed' => DateTimeFormat::utcNow(),
$fields = ['title' => defaults($item, 'title', ''), 'body' => defaults($item, 'body', ''),
'tag' => defaults($item, 'tag', ''), 'changed' => DateTimeFormat::utcNow(),
'edited' => DateTimeFormat::utc($item["edited"])];
$condition = ["`uri` = ? AND `uid` IN (0, ?)", $item["uri"], $importer["importer_uid"]];

2
src/Protocol/PortableContact.php

@ -1302,7 +1302,7 @@ class PortableContact
if (isset($data->version)) {
$network = NETWORK_DFRN;
$noscrape = $data->no_scrape_url;
$noscrape = defaults($data->no_scrape_url, '');
$version = $data->version;
$site_name = $data->site_name;
$info = $data->info;

Loading…
Cancel
Save