Skip to content

Commit d52a7e8

Browse files
committed
fixed fatal errors when allow_url_open is deactivated
1 parent c3be35c commit d52a7e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/Visualizer/Source/Csv/Remote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getSourceName() {
137137
protected function _get_file_handle( $filename = false ) {
138138
static $allow_url_fopen = null;
139139

140-
if ( $this->_tmpfile && is_readable( $this->_tmpfile ) ) {
140+
if ( ! is_wp_error( $this->_tmpfile ) && $this->_tmpfile && is_readable( $this->_tmpfile ) ) {
141141
return parent::_get_file_handle( $this->_tmpfile );
142142
}
143143

0 commit comments

Comments
 (0)