Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Checks for file before reading

AuthorDave Jarvis <email>
Date2026-02-11 19:43:56 GMT-0800
Commit00f60439292cd53a99574efde101a29da0f2617b
Parentabdcf70
BasePage.php
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo Config::SITE_TITLE . ($this->title ? ' - ' . htmlspecialchars($this->title) : ''); ?></title>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css">
<link rel="stylesheet" href="repo.css">
</head>
Git.php
$loosePath = $this->getLoosePath( $sha );
- if( file_exists( $loosePath ) ) {
+ if( is_file( $loosePath ) ) {
$fileHandle = @fopen( $loosePath, 'rb' );
$path = $this->getLoosePath( $sha );
- if( !file_exists( $path ) ) {
+ if( !is_file( $path ) ) {
return 0;
}
Delta3 lines added, 3 lines removed