From 298978ebdcb6d92349ead62df06fcd0c8c808c3e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 29 Apr 2021 11:05:44 +0800 Subject: [PATCH] create ojbect if doesnt exist? --- MTrack/SCM/Git/Event.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MTrack/SCM/Git/Event.php b/MTrack/SCM/Git/Event.php index 52a24633..3cf011bc 100644 --- a/MTrack/SCM/Git/Event.php +++ b/MTrack/SCM/Git/Event.php @@ -111,6 +111,10 @@ class MTrack_SCM_Git_Event extends MTrackSCMEvent $info = preg_split('#\s+#', substr($line ,1), 3); //print_r($info); $name = $info[2]; + if (!isset($ent->files[$name])) { + $ent->files[$name] = new stdClass; // ?? + } + $ent->files[$name]->added = $info[0]; $ent->files[$name]->removed = $info[1]; } -- 2.39.2