In the Devel module, php E_NOTICE warnings are now exposed, in an attempt to tighten up coding practices and improve readability and reliability of contrib modules. #970688: How to treat E_NOTICE in backtrace_error_handler()? has all the details.

CMF produces several e_notice warnings which need to be fixed and I'll make a patch for them.

Jonathan

Comments

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new874 bytes

Two messages produced:

notice: Undefined variable: true in cmf_admin_content_page()
(line 278 of /Applications/MAMP/htdocs/HelpingYouHarmonise/sites/all/modules/cmf/cmf.module)

which can be fixed by changing

if (arg(0) == 'user' && is_numeric(arg(1)) && arg(1) > 0) {
  $true = TRUE;
}

to

$true = (arg(0) == 'user' && is_numeric(arg(1)) && arg(1) > 0);

and

notice: Undefined index: operation in cmf_admin_content_page()
(line 282 of /Applications/MAMP/htdocs/HelpingYouHarmonise/sites/all/modules/cmf/cmf.module)

which can be fixed by changing

if ($_POST['operation'] == 'delete' && $_POST['nodes']) {

to

if (isset($_POST['operation']) && $_POST['operation'] == 'delete' && $_POST['nodes']) {

Attached is a patch for the above changes.

irakli’s picture

Status: Needs review » Closed (fixed)
jonathan1055’s picture

Status: Closed (fixed) » Fixed

Thanks very much.
Set back to 'fixed' so it shows in the issue queue and dashboard.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.