CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What to do about Notice: Undefined index: errors?
Pages: [1]

Author Topic: What to do about Notice: Undefined index: errors?  (Read 1395 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
What to do about Notice: Undefined index: errors?
April 25, 2013, 01:37:24 pm
I know the conventional wisdom is to ignore them and all notices but I've found that they sometimes lead to a problem.  Would it make sense to start tracking these somewhere - ideally in the forums so people can either comment or find the error when searching and not have to ask :)?  I'd be happy to seed the list with a few....

S.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: What to do about Notice: Undefined index: errors?
April 25, 2013, 01:48:49 pm

for 4.3.x, you should reproduce the notice on demo and if so file an issue with the steps needed to reproduce

if you can include a patch with the issue that would be even better

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: What to do about Notice: Undefined index: errors?
April 25, 2013, 01:58:34 pm
I can't seem to reproduce but that may be because E_NOTICE PHP errors are not displayed and I can't access php/apache logs.

I do see lot's of forum comments about notices - wonder if a list somewhere might also be helpful for PHP illiterates :)

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: What to do about Notice: Undefined index: errors?
April 25, 2013, 04:04:10 pm
In general they are incredibly easy to fix. In one typical example you'd replace this:
if ($foo)
with this:
if (!empty($foo))

Try submitting a patch or pull request to fix one or more. We'll let you know if it's not right.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What to do about Notice: Undefined index: errors?

This forum was archived on 2017-11-26.