Skip to content

Commit

Permalink
fix: add uploadsPath with the exception for easier debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
carlalexander committed Jul 10, 2023
1 parent ce80ea5 commit 400bef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RestApi/GetFileDetailsEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function respond(\WP_REST_Request $request)
preg_match('/(uploads.*)/', substr($this->uploadsPath, 0, -strlen($this->uploadsSubdirectory)), $matches);

if (empty($matches[1])) {
throw new \RuntimeException('Unable to parse uploads path');
throw new \RuntimeException(sprintf('Unable to parse "%s" uploads path', $this->uploadsPath));
}

return [
Expand Down

0 comments on commit 400bef7

Please sign in to comment.