Last active
December 31, 2015 20:39
-
-
Save benhuson/8041176 to your computer and use it in GitHub Desktop.
Patch for Users 2 CSV WordPress plugin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: users2csv.php | |
=================================================================== | |
--- users2csv.php (revision 277117) | |
+++ users2csv.php (working copy) | |
@@ -26,7 +26,7 @@ | |
if ( is_admin() ) { | |
- if ($_GET['page'] == "users2csv.php") { | |
+ if ( isset( $_GET['page'] ) && $_GET['page'] == 'users2csv.php' ) { | |
function _valToCsvHelper($val, $separator, $trimFunction) { | |
if ($trimFunction) $val = $trimFunction($val); | |
//If there is a separator (;) or a quote (") or a linebreak in the string, we need to quote it. | |
@@ -209,7 +209,7 @@ | |
add_action('admin_menu','yoast_getcsv'); | |
} | |
- if ( ! class_exists( 'Users2CSV' ) && !$_GET['csv'] == "true" ) { | |
+ if ( ! class_exists( 'Users2CSV' ) && ( ! isset( $_GET['csv'] ) || ! $_GET['csv'] == 'true' ) ) { | |
class Users2CSV { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment