Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Old Version fixes and change logs (http://forum.bytesforall.com/forumdisplay.php?f=37)
-   -   PATCH 3722-03: Fix an 'Undefined index: bfa_ata_noncename’ warning message (http://forum.bytesforall.com/showthread.php?t=23055)

juggledad Feb 9, 2015 04:48 AM

PATCH 3722-03: Fix an 'Undefined index: bfa_ata_noncename’ warning message
 
1 Attachment(s)
If you find this patch useful, consider donating. I spent my time digging into the issue and coming up with a fix. Without donations, there is not much incentive for me to try and fix anything that doesn't effect the sites I work on is there?


A PHP Notice (a warning message) may show up using various plugins with Atahualpa, if you have
HTML Code:

define('WP_DEBUG', true);
in your wp-config.php file. The message will look like this:
HTML Code:

[09-Feb-2015 10:50:41 UTC] PHP Notice:  Undefined index: bfa_ata_noncename in /...some list of folders.../wp-content/themes/atahualpa/functions.php on line 652
This patch will prevent the message from appearing.

To fix this issue edit 'function.php' and change line 652 from
HTML Code:

  if ( !wp_verify_nonce( $_POST['bfa_ata_noncename'], plugin_basename(__FILE__) )) {
to
HTML Code:

if (isset($_POST['bfa_ata_noncename']))   
{   

        if ( !wp_verify_nonce( $_POST['bfa_ata_noncename'], plugin_basename(__FILE__) )) {

and change line 682 from
HTML Code:

if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
to
HTML Code:

}

if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9

or you can replace the existing functions.php' with this version (remember to unzip it first)


All times are GMT -6. The time now is 08:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.