Control: tags -1 + patch
Olivier Berger <[email protected]> writes:
>
> I'm getting the following errors reported by the forge_run_job
> gather_scm_stats.php cronjob :
>
> PHP Notice: Undefined index: mode in
> /usr/share/gforge/plugins/scmgit/common/GitPlugin.class.php on line 556
> PHP Notice: Undefined index: mode in
> /usr/share/gforge/plugins/scmgit/common/GitPlugin.class.php on line 559
> PHP Notice: Undefined index: mode in
> /usr/share/gforge/plugins/scmgit/common/GitPlugin.class.php on line 562
>
Obviously, the following patch gets rid of the problem, even though this may be
a
symptom of something nastier (haven't checked what this is supposed to
do exactly) :
root@fusionforge:/usr/share/gforge/plugins/scmgit/common# diff -u
GitPlugin.class.php.orig GitPlugin.class.php
--- GitPlugin.class.php.orig 2014-01-20 13:11:57.000000000 +0100
+++ GitPlugin.class.php 2014-01-20 13:14:04.000000000 +0100
@@ -553,14 +553,16 @@
if (!isset
($usr_adds[$last_user])) $usr_adds[$last_user] = 0;
if (!isset
($usr_updates[$last_user])) $usr_updates[$last_user] = 0;
if (!isset
($usr_deletes[$last_user])) $usr_deletes[$last_user] = 0;
- if ($matches['mode'] == 'A') {
+ if( isset($matches['mode']) ) {
+ if ($matches['mode'] ==
'A') {
$usr_adds[$last_user]++;
$adds++;
- } elseif ($matches['mode'] ==
'M') {
+ } elseif ($matches['mode']
== 'M') {
$usr_updates[$last_user]++;
$updates++;
- } elseif ($matches['mode'] ==
'D') {
+ } elseif ($matches['mode']
== 'D') {
$usr_deletes[$last_user]++;
+ }
}
}
}
Hope this helps.
Best regards,
--
Olivier BERGER
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]