File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ private function getFromPath(string $assetPath): ?AssetVersion
110
110
private function getAssetVersionFromGitRevisions (string $ assetPath ): ?AssetVersion
111
111
{
112
112
$ realPath = realpath ($ this ->pathToBeProcessed . $ assetPath );
113
+
114
+ if (!$ realPath ) {
115
+ return null ;
116
+ }
113
117
114
118
$ command = sprintf ('git log --oneline %s | wc -l ' , escapeshellarg ($ realPath ));
115
119
$ revision = (int ) exec ($ command );
@@ -124,6 +128,11 @@ private function getAssetVersionFromGitRevisions(string $assetPath): ?AssetVersi
124
128
private function getAssetVersionFromFileUpdateTime (string $ assetPath ): ?AssetVersion
125
129
{
126
130
$ realPath = realpath ($ this ->pathToBeProcessed . $ assetPath );
131
+
132
+ if (!$ realPath ) {
133
+ return null ;
134
+ }
135
+
127
136
$ modificationTime = (int ) filemtime ($ realPath );
128
137
129
138
if (!$ modificationTime ) {
You can’t perform that action at this time.
0 commit comments