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) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • What is the source of an "Undefined index" error?
Pages: [1]

Author Topic: What is the source of an "Undefined index" error?  (Read 438 times)

pixcode

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal
  • MySQL version: 5.x
  • PHP version: 5.2
What is the source of an "Undefined index" error?
March 10, 2014, 02:39:56 pm
I have indeed RTFM'd, but am willing to accept a link if not a direct answer to how I make an error (that started turning up just before I inherited this project) go away:

Notice: Undefined index: [line #] in civicrm_handler_field_state->render() ...

I see it on other people's sites so I know there must be a few people who would love to know how to fix this.

Thanks!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: What is the source of an "Undefined index" error?
March 10, 2014, 04:28:23 pm
This is a generic PHP message saying that the code is trying to access a variable that doesn't exist. They are usually harmless, sometimes not.
To get rid of it you need to try to understand what the code is attempting to do. Often the fix looks like this:
Replace something like
Code: [Select]
if ($foo['bar'])with
Code: [Select]
if (!empty($foo['bar']))
Try asking your question on the new CiviCRM help site.

pixcode

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal
  • MySQL version: 5.x
  • PHP version: 5.2
Re: What is the source of an "Undefined index" error?
March 11, 2014, 10:47:37 am
Awesome, thanks.

I was hoping that it was something obvious to do with the ongoing battle between CiviCRM and OG rather than requiring that I go in and modify the code, but c'est la vie.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • What is the source of an "Undefined index" error?

This forum was archived on 2017-11-26.