Skip to content

Commit c59b909

Browse files
Merge pull request #1018 from Codeinwp/bugfix/pro/380
Fixed compatibility issue with WP 5.6
2 parents 33247e0 + 9667120 commit c59b909

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)