Skip to content

Commit 432294b

Browse files
committed
Fix bug where website was shown when NULL
1 parent 17686a4 commit 432294b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libraries/UserProfile.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public function getTwitterUsername() {
132132
}
133133

134134
public function getWebsite() {
135+
if (!is_string($this->website)) return $this->website;
135136
$value = strtolower($this->website);
136137
if (substr($value, 0, 7) == "http://") {
137138
return substr($value, 7);
@@ -143,6 +144,7 @@ public function getWebsite() {
143144
}
144145

145146
public function getWebsiteURI() {
147+
if (!is_string($this->website)) return $this->website;
146148
$value = strtolower($this->website);
147149
if (substr($value, 0, 7) == "http://"
148150
|| substr($value, 0, 8) == "https://") {

0 commit comments

Comments
 (0)