latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Code Problems

Home Forums Community Forum Code Problems

Tagged: 

This topic contains 6 replies, has 2 voices. Last updated by  Eduan 3 years, 11 months ago.

Topic Author Topic
Posted: Saturday Jan 12th, 2013 at 4:12 pm #37180
Steve G
Username: steveg

I made the following changes to s2Member to avoid problems. You may want to do the same.

• wp-content/plugins/s2member/includes/classes/admin-notices.inc.php [Notice Message]
o Change line 136 to
if (!$page || “*” === $page || $pagenow === $page || (isset($_GET[“page”]) && $_GET[“page”] === $page))
• wp-content/plugins/s2member/includes/classes /users-list-in.inc.php [Notice Message]
o Change line 468 to
if(!empty($fields) && array_key_exists($field_var, $fields)){
unset ($fields[$field_var]);
}
• wp-content/plugins/s2member/includes/classes /profile-mods-in.inc.php [Notice Message]
o Change line 108 to
if(!empty($fields) && array_key_exists($field_var, $fields)){
unset ($fields[$field_var]);
}

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Sunday Jan 13th, 2013 at 9:09 pm #37318
Eduan
Username: Eduan
Moderator

Steve,

Could you please past an uncorrupted version of your code, and put it inside the code tags? Thanks!

– Eduan

Posted: Monday Jan 14th, 2013 at 11:33 am #37429
Steve G
Username: steveg

Eduan,

How’s this? BTW, Notice Messages appear when WP_DEBUG is true.

Steve

wp-content/plugins/s2member/includes/classes/admin-notices.inc.php [Notice Message]
Change line 136 to

if (!$page || "*" === $page || $pagenow === $page || (isset($_GET["page"]) && $_GET["page"] === $page))

wp-content/plugins/s2member/includes/classes /users-list-in.inc.php [Notice Message]
Change line 468 to

if(!empty($fields) && array_key_exists($field_var, $fields)){
  unset ($fields[$field_var]);
}

wp-content/plugins/s2member/includes/classes /profile-mods-in.inc.php [Notice Message]
Change line 108 to

if(!empty($fields) && array_key_exists($field_var, $fields)){
  unset ($fields[$field_var]);
}
Posted: Tuesday Jan 15th, 2013 at 9:57 pm #37694
Eduan
Username: Eduan
Moderator

That’s better. :)

Although honestly, I’m personally not able to provide much help. :P
I just said it so that if somebody can help then they can read the code clearly. :)

– Eduan

Posted: Wednesday Jan 16th, 2013 at 11:19 am #37764
Steve G
Username: steveg

Eduan,

I wasn’t requesting help. I just wanted the s2Member developers to be aware of 3 potential problems and what I did to correct them.

Steve

Posted: Thursday Jan 17th, 2013 at 6:11 pm #37957
Eduan
Username: Eduan
Moderator

Ah I see, oops!

I’ll notify Jason of this. :)

Exactly what did you fix however? It isn’t too clear.

– Eduan

Posted: Friday Jan 18th, 2013 at 9:17 am #38022
Eduan
Username: Eduan
Moderator

Here’s what he said, quote:

It looks like he’s trying to get rid of PHP debugging NOTICES in PHP, because he’s running WordPress in WP_DEBUG mode. The changes he’s suggesting are pretty good ones. However, they’re not necessary. That is, they don’t fix anything, they just cleanup the code and prevent notices from occurring, making the code more solid overall.

s2X will be compatible with WP_DEBUG mode. However, I’m not planning to update the existing software to support this, simply because it would leave too much room for error, and perhaps introduce bugs into an otherwise stable application :-)

Viewing 6 replies - 1 through 6 (of 6 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.