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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Warning with Phone Create API
Pages: [1]

Author Topic: Warning with Phone Create API  (Read 1060 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Warning with Phone Create API
September 19, 2011, 10:09:14 am
Here is the code:

Code: [Select]
    $phone = civicrm_api("Phone", "create", $params);
Here is the $params array:

Code: [Select]
Array
(
    [version] => 3
    [contact_id] => 4147
    [location_type_id] => 1
    [phone_type_id] => 1
    [phone] => 111 day phone
    [is_primary] => 1
)

And here is the resultant $phone array

Code: [Select]
Array
(
    [is_error] => 0
    [version] => 3
    [count] => 1
    [id] => 359
    [values] => Array
        (
            [359] => Array
                (
                    [id] => 359
                    [contact_id] => 4147
                    [is_primary] => 1
                    [phone] => 111 day phone
                    [phone_type_id] => 1
                )

        )

)

Everything appears to work fine, but I get this:

Code: [Select]
Notice: Undefined index: options in _civicrm_api3_apply_options_to_dao() (line 442 of /srv/http/site.org/sites/all/modules/civicrm/api/v3/utils.php).
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Warning with Phone Create API
September 19, 2011, 11:36:42 am
Issue created: http://issues.civicrm.org/jira/browse/CRM-8889 The fix is of course trivial.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Warning with Phone Create API
September 19, 2011, 02:07:12 pm
Hi,

The fixes tend to happen in the API quite quickly so if you hit any issues it's probably good to grab the latest copy of the API folder
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Warning with Phone Create API
September 20, 2011, 03:00:03 am
Good to know. Thanks.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Warning with Phone Create API

This forum was archived on 2017-11-26.