Be sure to report the bugs at
http://bugs.modx.com or on the Issues tab of the GitHub page for the extra, if the error is in an extra -- and paste the notice because the line number will help the author find it.
The fix is usually pretty simple (though not always). It's usually a line like this:
if ($arrayName[something]) {
that should be:
if (isset($arrayName[something]) && $arrayName[something]) {
or a line like this:
if ($arrayName[something] == something-else) {
That should be:
if (isset($arrayName[something]) && $arrayName[something] == something-else) {
If E_NOTICE is on, newer versions of PHP will complain if you refer to a non-existent array member. The isset() test makes sure that if the variable is not set, the second test never executes.
If it's a negative test:
if (! $arrayName[something]) {
or:
if (empty($arrayName[something])) {
You have to change the logic to use || (OR) instead of && (AND):
if (! isset ($arrayName[something]) || ! $arrayName[something]) {
or:
if (! isset ($arrayName[something]) || empty($arrayName[something]) {
If you're not comfortable messing with stuff like that, you should definitely wait for an upgrade and/or turn off E_NOTICE.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
[ed. note: BobRay last edited this post 14 years, 2 months ago.]