jenkins-bot has submitted this change and it was merged.

Change subject: Get rid of Notice: Undefined property: stdClass::$image that 
pops up on collaborationlists when initially opening to edit with preview
......................................................................


Get rid of Notice: Undefined property: stdClass::$image that pops up on
collaborationlists when initially opening to edit with preview

We might as well just check if the image is set before checking if it's
a string.

Change-Id: Ibeee3c066f13133cce01efba03028c1bd7e61f02
---
M includes/content/CollaborationListContent.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Isarra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 3bedad3..2b9d775 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -374,7 +374,7 @@
                                if ( class_exists( 'PageImages' ) ) {
                                        $image = PageImages::getPageImage( 
$titleForItem );
                                }
-                       } elseif ( is_string( $item->image ) ) {
+                       } elseif ( isset( $item->image ) && is_string( 
$item->image ) ) {
                                $imageTitle = Title::newFromText( $item->image, 
NS_FILE );
                                if ( $imageTitle ) {
                                        $image = wfFindFile( $imageTitle );

-- 
To view, visit https://gerrit.wikimedia.org/r/305405
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibeee3c066f13133cce01efba03028c1bd7e61f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Isarra <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to