#1488469 closed Bugs (fixed)

PHP warning when editing a contact

Reported by: gerol80 Owned by:
Priority: 5 Milestone: 0.8-rc
Component: Addressbook Version: 0.7.2
Severity: normal Keywords: warning contact edit
Cc:

Description

Hi,
using PHP 5.4, when I'm editing a contact, I get the following PHP warnings:

Warning: Illegal string offset 'street' in /var/www/example.com/program/steps/addressbook/func.inc on line 581
Warning: Illegal string offset 'locality' in /var/www/example.com/program/steps/addressbook/func.inc on line 581
Warning: Illegal string offset 'zipcode' in /var/www/example.com/program/steps/addressbook/func.inc on line 581
Warning: Illegal string offset 'region' in /var/www/example.com/program/steps/addressbook/func.inc on line 581
Warning: Illegal string offset 'country' in /var/www/example.com/program/steps/addressbook/func.inc on line 581

Change History (3)

comment:1 Changed 12 months ago by alec

What addressbook are you using. Build in SQL-based or LDAP? If LDAP provide the config.

comment:2 Changed 12 months ago by gerol80

I'm using the built-in SQL-based addressbook.

This warning is new since PHP 5.4. See http://php.net/manual/en/language.types.array.php:

From PHP 5.4, string offset access made consistent. As a result, some return values may be different from older version. As of PHP 5.4, string offsets should be an integer or an integer like string, otherwise the result will be a warning.

Thus, for example, one should not use 'street' as a string offset anymore.

comment:3 Changed 12 months ago by alec

  • Milestone changed from 0.8-stable to 0.8-rc
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.