Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-notice
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-notice
Commits
cd51ab56
Commit
cd51ab56
authored
2 years ago
by
Marcin Kolanko
Browse files
Options
Downloads
Plain Diff
Merge branch 'bugfix/get_current_screen_fail' into 'master'
fix: check if get_current_screen is an object See merge request
!27
parents
082da904
f4ce8d68
No related branches found
No related tags found
1 merge request
!27
fix: check if get_current_screen is an object
Pipeline
#180757
passed with warnings
2 years ago
Stage: prepare-vendor
Stage: tools
Stage: tests
Stage: deploy
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
src/WPDesk/Notice/Notice.php
+3
-1
3 additions, 1 deletion
src/WPDesk/Notice/Notice.php
with
6 additions
and
1 deletion
CHANGELOG.md
+
3
−
0
View file @
cd51ab56
## [3.2.3] - 2023-04-06
### Fixed
-
fatal error if get_current_screen function return null
## [3.2.2] - 2023-03-03
### Added
-
security nonce in permanent dismissible notice ajax action
...
...
This diff is collapsed.
Click to expand it.
src/WPDesk/Notice/Notice.php
+
3
−
1
View file @
cd51ab56
...
...
@@ -101,7 +101,9 @@ class Notice
require_once
ABSPATH
.
'/wp-admin/includes/screen.php'
;
}
return
\get_current_screen
()
->
is_block_editor
();
$screen
=
\get_current_screen
();
return
is_object
(
$screen
)
?
$screen
->
is_block_editor
()
:
false
;
}
/**
...
...
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
register
or
sign in
to comment