Skip to content

Commit 04c5d07

Browse files
authored
Merge pull request #23 from AmritasyaPutra/patch-1
PHP 8.1 fixes
2 parents 198c0ba + af079bb commit 04c5d07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getDescription()
131131
*/
132132
public function getAuthor()
133133
{
134-
return ($this->meta['creator'] ? $this->meta['creator'] : null);
134+
return array_key_exists('creator', $this->meta) ? $this->meta['creator'] : null;
135135
}
136136

137137
/**
@@ -205,7 +205,7 @@ public function getStructuredData()
205205
$license = $this->getLicense();
206206
$type = $this->getSchemaOrgType();
207207
$user_data = ($this->getConf('hideMail') ? array('mail' => null) : $auth->getUserData($this->getAuthorID()));
208-
$license_url = $license['url'];
208+
$license_url = (($license !== null) and array_key_exists('url', $license)) ? $license['url'] : null;
209209
$page_url = wl($this->page, '', true);
210210
$description = str_replace("\n", ' ', $this->getDescription());
211211
$created = date(DATE_W3C, $this->getCreatedDate());

0 commit comments

Comments
 (0)