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.

s2member shows notice for undef. variable+fix

Home Forums Community Forum s2member shows notice for undef. variable+fix

Tagged: 

This topic contains 1 reply, has 1 voice. Last updated by  Svetoslav Marinov 3 years, 6 months ago.

Topic Author Topic
Posted: Thursday Feb 7th, 2013 at 2:07 pm #41042

I’ve been working on a new plugin with debug turned on. Here is what I found.

( ! ) Notice: Undefined variable: cache_needs_updating in C:xxxxxxxxhtdocswp-contentpluginss2memberincludesclassescache.inc.php on line 97

old:
if ($cache_needs_updating) /* Cache is also reset dynamically during back-end option updates. */
{
update_option (“ws_plugin__s2member_cache”, $GLOBALS[“WS_PLUGIN__”][“s2member”][“c”][“cache”]);
}

fix:
if (!empty($cache_needs_updating)) /* Cache is also reset dynamically during back-end option updates. */
{
update_option (“ws_plugin__s2member_cache”, $GLOBALS[“WS_PLUGIN__”][“s2member”][“c”][“cache”]);
}

I just updated to the latest version: 130207

( ! ) Notice: Use of undefined constant NC_Markdown_Parser – assumed ‘NC_Markdown_Parser’ in C:projectsclientsxxxxxhtdocswp-contentpluginss2memberincludesexternalsmarkdownnc-markdown.inc.php on line 30

Just put NC_Markdown_Parser in quotes.
$parser_class = ‘NC_Markdown_Parser’;

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Saturday Jun 15th, 2013 at 6:35 pm #52008

The notices still show up.

Only two extremely simple fixes. Please let Jason know. It’ll take just 30 seconds to fix.

1) htdocs\wp-content\plugins\s2member\includes\classes\cache.inc.php
#line 94
replace this line
if /* Cache is also reset dynamically during back-end option updates. */ ($cache_needs_updating)

with
if /* Cache is also reset dynamically during back-end option updates. */ (!empty($cache_needs_updating))

2) Notice: Undefined index: page in htdocs\wp-content\plugins\s2member\includes\classes\admin-notices.inc.php on line 134

if (!$page || “*” === $page || $pagenow === $page || $_GET[“page”] === $page)

with

if (empty($page) || “*” === $page || $pagenow === $page || (!empty($_GET[“page”]) && $_GET[“page”] === $page) )

Viewing 1 replies (of 1 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.