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 CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • String errors when interviewing respondents
Pages: [1]

Author Topic: String errors when interviewing respondents  (Read 796 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
String errors when interviewing respondents
November 23, 2011, 10:38:35 pm
When interviewing respondents, the Drupal log contains many entries with errors like ...

htmlspecialchars() expects parameter 1 to be string, array given in /var/www/citybibleforum/sites/all/modules/civicrm/packages/HTML/Common.php on line 144.
strlen() expects parameter 1 to be string, array given in /var/www/citybibleforum/sites/all/modules/civicrm/packages/HTML/QuickForm/element.php on line 238.

The second error is a call to HTML_QuickForm_element::getFrozenHtml() where the $this object is ...
Code: [Select]
$this HTML_QuickForm_text
[0...8]
CLASSNAME HTML_QuickForm_text
_label Primary phone
_type text
_flagFrozen true
_persistantFreeze true
_attributes Array [7]
[0...6]
maxlength 32
size 20
name field[16063][phone-Primary-1]
type text
value Array [2]
[0...1]
2_id 24271
2 9999 999 999
id field_16063_phone-Primary-1
class form-text medium
_tabOffset 0
_tab
_lineEnd
_comment

(I've sanitised the actual phone number.) The code expects 'value' to be a String, but it is an Array[2] so the error is thrown. The outcome is that the 'value' attribute in the resulting HTML INPUT element is empty.
Code: [Select]
&nbsp;<input type="hidden" name="field[16063][phone-Primary-2]" value="" id="field_16063_phone-Primary-2" />
The interview uses a profile that includes the Primary work number and Primary mobile number. These end up being displayed correctly, despite this error.

It seems harmless - I can't see what the side-effects are - but it may be doing some damage somewhere,

Ken

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: String errors when interviewing respondents
November 24, 2011, 03:08:14 am
Ken,

I was not able to replicate this on trunk ( 4.1 ), so looks like already fixed

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • String errors when interviewing respondents

This forum was archived on 2017-11-26.