Browse Source

use existing has function

pull/793/head
elizoller 4 years ago
parent
commit
df6e70e69e
  1. 3
      src/Flysystem/Adapter/FedoraAdapter.php

3
src/Flysystem/Adapter/FedoraAdapter.php

@ -253,8 +253,7 @@ class FedoraAdapter implements AdapterInterface {
$headers = [ $headers = [
'Content-Type' => $this->mimeTypeGuesser->guess($path), 'Content-Type' => $this->mimeTypeGuesser->guess($path),
]; ];
$heads_response = $this->fedora->getResourceHeaders($path); if ($this->has($path)) {
if (isset($heads_response) && $heads_response->getStatusCode() == 200) {
$fedora_url = $path; $fedora_url = $path;
$date = new DateTime(); $date = new DateTime();
$timestamp = $date->format("D, d M Y H:i:s O"); $timestamp = $date->format("D, d M Y H:i:s O");

Loading…
Cancel
Save