Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quicktabs
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
quicktabs
Commits
bb435b57
Commit
bb435b57
authored
7 months ago
by
Stephen Mustgrave
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3293922
by shobhit91, smustgrave: Call to a member function getRenderArray() on null
parent
0452d8f8
No related branches found
No related tags found
3 merge requests
!21
Issue #3407343 Add theme template for loading animation/markup
,
!14
Issue #3189439: Last clicked tab history should be configurable
,
!11
Issue #3238148: Tabs still displayed even when empty
Pipeline
#430152
passed with warnings
7 months ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/Block/QuickTabsBlock.php
+5
-5
5 additions, 5 deletions
src/Plugin/Block/QuickTabsBlock.php
with
5 additions
and
5 deletions
src/Plugin/Block/QuickTabsBlock.php
+
5
−
5
View file @
bb435b57
...
...
@@ -5,6 +5,7 @@ namespace Drupal\quicktabs\Plugin\Block;
use
Drupal\block_content
\Plugin\Derivative\BlockContent
;
use
Drupal\Core\Block\Attribute\Block
;
use
Drupal\Core\Block\BlockBase
;
use
Drupal\Core\Logger\LoggerChannelTrait
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
use
Drupal\Core\StringTranslation\TranslatableMarkup
;
...
...
@@ -21,6 +22,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
)]
class
QuickTabsBlock
extends
BlockBase
implements
ContainerFactoryPluginInterface
{
use
LoggerChannelTrait
;
/**
* Constructs a BlockComponentRenderArray object.
*
...
...
@@ -52,11 +55,8 @@ class QuickTabsBlock extends BlockBase implements ContainerFactoryPluginInterfac
$qt
=
$this
->
entityTypeManager
->
getStorage
(
'quicktabs_instance'
)
->
load
(
$qt_id
);
if
(
!
isset
(
$qt
))
{
return
[
'#markup'
=>
$this
->
t
(
'Broken QuickTabs block with ID: @id'
,
[
'@id'
=>
$this
->
getDerivativeId
(),
]),
];
$this
->
getLogger
(
'quicktabs'
)
->
warning
(
'Broken QuickTabs block. QuickTabs block does not exist.'
);
return
[];
}
return
$qt
->
getRenderArray
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment