Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Commit-Webhook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gitlab
Commit-Webhook
Commits
d99c87b1
Commit
d99c87b1
authored
10 years ago
by
Markus Guenther
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Add missing sprintf() in the hook code base
Fixes:
#1
parent
e61bd7e6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Classes/Utility/GeneralUtility.php
+3
-3
3 additions, 3 deletions
Classes/Utility/GeneralUtility.php
Classes/Webhook.php
+1
-1
1 addition, 1 deletion
Classes/Webhook.php
gitlab.php
+2
-2
2 additions, 2 deletions
gitlab.php
with
6 additions
and
6 deletions
Classes/Utility/GeneralUtility.php
+
3
−
3
View file @
d99c87b1
...
...
@@ -206,7 +206,7 @@ class GeneralUtility {
/** @var array $members */
$members
=
$projects
->
members
(
$id
);
}
catch
(
RuntimeException
$e
)
{
error_log
(
'Unable to get project member data'
,
$e
->
getMessage
());
error_log
(
sprintf
(
'Unable to get project member data'
,
$e
->
getMessage
())
)
;
}
return
count
(
$members
)
?
$members
:
[];
...
...
@@ -226,7 +226,7 @@ class GeneralUtility {
/** @var array $userData */
$userData
=
$users
->
all
();
}
catch
(
RuntimeException
$e
)
{
error_log
(
'Unable to get user data'
,
$e
->
getMessage
());
error_log
(
sprintf
(
'Unable to get user data'
,
$e
->
getMessage
())
)
;
}
return
count
(
$userData
)
?
$userData
:
[];
...
...
@@ -248,7 +248,7 @@ class GeneralUtility {
/** @var array $groupData */
$groupData
=
$groups
->
members
(
$groupId
);
}
catch
(
RuntimeException
$e
)
{
error_log
(
'Unable to get group data'
,
$e
->
getMessage
());
error_log
(
sprintf
(
'Unable to get group data'
,
$e
->
getMessage
())
)
;
}
return
count
(
$groupData
)
?
$groupData
:
[];
...
...
This diff is collapsed.
Click to expand it.
Classes/Webhook.php
+
1
−
1
View file @
d99c87b1
...
...
@@ -112,7 +112,7 @@ class Webhook {
/** @var array $members */
$projectData
=
$projects
->
show
(
$projectId
);
}
catch
(
RuntimeException
$e
)
{
error_log
(
'Unable to get project data'
,
$e
->
getMessage
());
error_log
(
sprintf
(
'Unable to get project data'
,
$e
->
getMessage
())
)
;
exit
;
}
...
...
This diff is collapsed.
Click to expand it.
gitlab.php
+
2
−
2
View file @
d99c87b1
...
...
@@ -40,5 +40,5 @@ try {
$webhook
=
new
Webhook
(
$request
,
$settings
);
$webhook
->
processWebhook
();
}
catch
(
ParseException
$e
)
{
error_log
(
'Unable to parse the YAML string: %s'
,
$e
->
getMessage
());
}
error_log
(
sprintf
(
'Unable to parse the YAML string: %s'
,
$e
->
getMessage
())
)
;
}
\ No newline at end of file
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