Skip to content

Commit

Permalink
Added additional array check to prevent PHP warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm authored Mar 8, 2019
1 parent eae8f2e commit 287f6e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/contao/modules/FrontendTwitterReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function compile()
}
$objFeed = $oauth->get('statuses/'.$this->twitter_requesttype, $arrFeed);

if (\count($objFeed->errors) > 0) {
if (is_array($objFeed->errors) && \count($objFeed->errors) > 0) {
\System::log($objFeed->errors[0]->message, __METHOD__, TL_ERROR);
} else {
if (\is_array($objFeed)) {
Expand Down

0 comments on commit 287f6e8

Please sign in to comment.