@@ -288,7 +288,6 @@ public function opendir(string $path) {
288288
289289	public  function  stat (string  $ patharray |false  {
290290		$ path$ this normalizePath ($ path
291- 
292291		if  ($ path'. ' ) {
293292			$ path'' ;
294293		} elseif  ($ this is_dir ($ path
@@ -308,22 +307,23 @@ public function stat(string $path): array|false {
308307			return  false ;
309308		}
310309
311- 		$ dateTime$ objectlastModified  ? \DateTime::createFromFormat (\DateTime::RFC1123 , $ objectlastModified ) : false ;
312- 		$ mtime$ dateTime$ dateTimegetTimestamp () : null ;
313- 		$ objectMetadata$ objectgetMetadata ();
314- 		if  (isset ($ objectMetadata'timestamp ' ])) {
315- 			$ mtime$ objectMetadata'timestamp ' ];
310+ 		$ mtimenull ;
311+ 		if  (!empty ($ objectlastModified )) {
312+ 			$ dateTimecreateFromFormat (\DateTime::RFC1123 , $ objectlastModified );
313+ 			if  ($ dateTimefalse ) {
314+ 				$ mtime$ dateTimegetTimestamp ();
315+ 			}
316316		}
317317
318- 		if  (! empty ( $ mtime 
319- 			$ mtimefloor ( $ mtime ) ;
318+ 		if  (is_numeric ( $ object -> getMetadata ()[ ' timestamp ' ] ??  null )) {
319+ 			$ mtime( float ) $ object -> getMetadata ()[ ' timestamp ' ] ;
320320		}
321321
322- 		$ stat  = []; 
323- 		$ stat [ 'size ' ] =  (int )$ objectcontentLength ; 
324- 		$ stat [ 'mtime ' ] =  $ mtime; 
325- 		$ stat [ 'atime ' ] =  time (); 
326- 		return   $ stat 
322+ 		return  [ 
323+ 			 'size '  =>  (int )$ objectcontentLength , 
324+ 			 'mtime '  =>  isset ( $ mtime) ? ( int ) floor ( $ mtime ) :  null , 
325+ 			 'atime '  =>  time (), 
326+ 		] ;
327327	}
328328
329329	public  function  filetype (string  $ path
0 commit comments