Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
6eed1556
Commit
6eed1556
authored
Oct 20, 2021
by
Michael Iseard
Browse files
get_campaign now requires 'value' parameter
parent
5e05f73e
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Helpers/Settings.php
View file @
6eed1556
...
@@ -565,14 +565,14 @@ class Settings {
...
@@ -565,14 +565,14 @@ class Settings {
}
}
/**
/**
* Gets the campaign by specified column (e.g id).
* Gets the campaign by specified column (e.g
.
id).
*
*
* @param string|null $value
* @param string|null $value
*
*
* @return array|null
* @return array|null
* @throws Exception
* @throws Exception
*/
*/
public
static
function
get_campaign
(
?
string
$value
):
?array
{
public
static
function
get_campaign
(
string
$value
):
?array
{
$campaigns
=
self
::
get_setting
(
'campaigns'
);
$campaigns
=
self
::
get_setting
(
'campaigns'
);
$key
=
array_search
(
$value
,
array_column
(
(
array
)
$campaigns
,
'id'
)
);
$key
=
array_search
(
$value
,
array_column
(
(
array
)
$campaigns
,
'id'
)
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment