Skip to content

Commit 2e4c0fb

Browse files
committed
Minor improvements for getAllowedSocialNetworks function
1 parent a276e51 commit 2e4c0fb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Block/Post/AbstractPost.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,12 @@ public function displayAddThisToolbox()
259259
/**
260260
* @return array
261261
*/
262-
public function getAllowedSocialNetworks()
262+
public function getAllowedSocialNetworks(): array
263263
{
264-
$socialNetworks = $this->_scopeConfig->getValue('mfblog/social/use_social_networks', ScopeInterface::SCOPE_STORE);
265-
return explode(',',$socialNetworks);
264+
$socialNetworks = (string)$this->_scopeConfig->getValue('mfblog/social/use_social_networks', ScopeInterface::SCOPE_STORE);
265+
if ($socialNetworks) {
266+
return explode(',', $socialNetworks);
267+
}
268+
return [];
266269
}
267270
}

0 commit comments

Comments
 (0)