Merge pull request #4621 from annando/not-null

Avoid storing "null" values
This commit is contained in:
Hypolite Petovan 2018-03-17 18:40:31 -04:00 committed by GitHub
commit e970bbdca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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"]];

View File

@ -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;