Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Stud.IP
Commits
dbc1e9d5
Commit
dbc1e9d5
authored
9 months ago
by
Thomas Hackl
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Exception in OpenGraph::extract() bei null-String"
Closes #4319 Merge request
studip/studip!3119
parent
e8ab5e4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/classes/OpenGraph.php
+3
-3
3 additions, 3 deletions
lib/classes/OpenGraph.php
with
3 additions
and
3 deletions
lib/classes/OpenGraph.php
+
3
−
3
View file @
dbc1e9d5
...
@@ -11,14 +11,14 @@ class OpenGraph
...
@@ -11,14 +11,14 @@ class OpenGraph
/**
/**
* Extracts urls and their according open graph infos from a given string
* Extracts urls and their according open graph infos from a given string
*
*
* @param string $string Text to extract urls and open graph infos from
* @param string
|null
$string Text to extract urls and open graph infos from
* @return OpenGraphURLCollection containing the extracted urls
* @return OpenGraphURLCollection containing the extracted urls
*/
*/
public
static
function
extract
(
string
$string
):
OpenGraphURLCollection
public
static
function
extract
(
?
string
$string
):
OpenGraphURLCollection
{
{
$collection
=
new
OpenGraphURLCollection
();
$collection
=
new
OpenGraphURLCollection
();
if
(
!
Config
::
get
()
->
OPENGRAPH_ENABLE
)
{
if
(
!
Config
::
get
()
->
OPENGRAPH_ENABLE
||
!
$string
)
{
return
$collection
;
return
$collection
;
}
}
...
...
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