Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Jun 27, 2024
1 parent 879db12 commit 0f573ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions includes/class-wcpdf-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ public function ajax_preview() {
}

} catch ( \Throwable $th ) {
wcpdf_log_error( 'Error trying to generate document: ' . $th->getTraceAsString(), 'critical' );

wp_send_json_error(
array(
'error' => sprintf(
Expand Down
2 changes: 1 addition & 1 deletion includes/wcpdf-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ function wpo_wcpdf_is_file_readable( string $path ): bool {

// Local path file check
} else {
if ( is_readable( $path ) ) {
if ( @is_readable( $path ) ) {
return true;
} else {
// Fallback to fopen if first check fails
Expand Down

0 comments on commit 0f573ea

Please sign in to comment.