Upon enabling the Node feedback module on Drupal 6.19 the following warning is displayed (after clicking on the contact form link within a node):
warning: htmlspecialchars() expects parameter 1 to be string, array given in ..../includes/bootstrap.inc on line 857.
This problem and how to go about diagnosing and reporting it is discussed in detail here:
http://drupal.org/node/829250#comment-3444480
To summarize - this happens when check_plain() is given an array instead of a text string.
I used the method described in the above thread to identify the source of the problem, this is the backtrace:
============
... (Array, 10 elements)
0 (Array, 4 elements)
.../public_html/webpagesforlife/includes/common.inc
line (Integer) 932
function (String, 11 characters ) check_plain | (Callback) check_plain();
args (Array, 1 element)
1 (Array, 4 elements)
file (String, 104 characters ) .../public_html/webpagesforlife/sit...
.../public_html/webpagesforlife/sites/all/modules/contrib/node_feedback/node_feedback.module
line (Integer) 83
function (String, 1 characters ) t | (Callback) t();
args (Array, 2 elements)
2 (Array, 2 elements)
function (String, 24 characters ) node_feedback_form_alter | (Callback) node_feedback_form_alter();
args (Array, 3 elements)
3 (Array, 4 elements)
file (String, 63 characters ) .../public_html/webpagesforlife/inc...
.../public_html/webpagesforlife/includes/common.inc
line (Integer) 2883
function (String, 20 characters ) call_user_func_array | (Callback) call_user_func_array();
args (Array, 2 elements)
4 (Array, 4 elements)
file (String, 61 characters ) .../public_html/webpagesforlife/inc...
.../public_html/webpagesforlife/includes/form.inc
line (Integer) 550
function (String, 12 characters ) drupal_alter | (Callback) drupal_alter();
============
The contents of the offending array passed into check_plain is:
... (Array, 2 elements)
0 (String, 21 characters ) -- Select category --
1 (String, 20 characters ) product info request
After installing the module I enabled it for one of my specific CCK-based content types ('product') with the following options:
-----------------
Display 'Product info request / Order' link on node teasers - OFF
Display 'Product info request / Order' link on full node view - ON
Force 'Product info request / Order' link on nodes - ON
Category:
Use: Site wide contact form
Contact form subject text: @link_text: @node_title
-----------------
Based on the contents of the modules directory this is what I have installed :
captcha-6.x-2.3.tar.gz
cck-6.x-2.9.tar.gz
filefield-6.x-3.9.tar.gz
imagefield-6.x-3.9.tar.gz
devel-6.x-1.23.tar.gz (only installed to diagnose the problem)
node_feedback-6.x-1.3.tar.gz
pathauto-6.x-1.5.tar.gz
profiler-6.x-2.0-beta1.tar.gz
token-6.x-1.15.tar.gz
views-6.x-2.12.tar.gz
Note that this issue happens in a Drupal 6.19 installation which is almost fresh, with very few modules, so if whoever will be fixing this issue is interested - please let me know and I can email you the entire sites dir + the DB (zipped). I would have attached the archives here, but the total size for both files is 3MB, which is more than the allowed limit of 2MB per post...
Comments
Comment #1
beautifulmindOkay. No problem.
I'll regenerate the issue and will update the code.
Regards.
Comment #2
beautifulmind