diff --git a/includes/api/ApiQueryQueryPage.php b/includes/api/ApiQueryQueryPage.php index ea2066490e7..26c17c59b8f 100644 --- a/includes/api/ApiQueryQueryPage.php +++ b/includes/api/ApiQueryQueryPage.php @@ -122,9 +122,12 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase { $title = Title::makeTitle( $row->namespace, $row->title ); if ( is_null( $resultPageSet ) ) { - $data = [ 'value' => $row->value ]; - if ( $qp->usesTimestamps() ) { - $data['timestamp'] = wfTimestamp( TS_ISO_8601, $row->value ); + $data = []; + if ( isset( $row->value ) ) { + $data['value'] = $row->value; + if ( $qp->usesTimestamps() ) { + $data['timestamp'] = wfTimestamp( TS_ISO_8601, $row->value ); + } } self::addTitleInfo( $data, $title );