Skip to content

Commit 9667120

Browse files
Fix compatibility issue with WP 5.6 Codeinwp/visualizer-pro#380
1 parent e422de4 commit 9667120

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

classes/Visualizer/Module.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ private function _getCSV( $rows, $filename, $enclose ) {
272272
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
273273
$fp = function_exists( 'tmpfile' ) ? @tmpfile() : null;
274274
if ( null === $fp ) {
275+
if ( ! function_exists( 'wp_tempnam' ) ) {
276+
require_once ABSPATH . 'wp-admin/includes/file.php';
277+
}
275278
$fp = fopen( wp_tempnam(), 'w+' );
276279
}
277280
if ( ! apply_filters( 'vizualizer_export_include_series_type', true ) ) {

0 commit comments

Comments
 (0)