Warning in CMS 1.1.3.1, TinyMCE

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Sy
Forum Members
Forum Members
Posts: 95
Joined: Fri Aug 17, 2007 11:13 am

Warning in CMS 1.1.3.1, TinyMCE

Post by Sy »

This isn't an error as such, but it will cause a warning to be displayed if you have errors set at the appropriate level in PHP.

Line 104. of TinyMCE.module.php, reads:

if (!$this->wysiwygactive ) {if (!$this->wysiwygactive && isset($_SESSION["tiny_live_textareas"]) ) {

Change this to:

if (!$this->wysiwygactive && isset($_SESSION["tiny_live_textareas"]) ) {

I get the warning:

Notice: Undefined index: tiny_live_textareas in C:\eska\modules\TinyMCE\TinyMCE.module.php on line 104

I always have error reporting set to display absolutely everything, which is good practice for development.
Ned Nowotny
Forum Members
Forum Members
Posts: 32
Joined: Mon Jan 29, 2007 1:19 am

Re: Warning in CMS 1.1.3.1, TinyMCE

Post by Ned Nowotny »

Sy wrote: Change this to:

if (!$this->wysiwygactive && isset($_SESSION["tiny_live_textareas"]) ) {
In PHP 4.0.7 and later, this line can be:

Code: Select all

if (!$this->wysiwygactive && array_key_exists("tiny_live_textareas", $_SESSION) ) {
The array_key_exists function is key_exists in PHP 4.0.6.

If you must be compatible with older versions of PHP, a somewhat inefficient solution is:

Code: Select all

if (!$this->wysiwygactive && in_array("tiny_live_textareas", array_keys($_SESSION) ) ) {
Post Reply

Return to “CMSMS Core”