By AndyW on
mysql_real_escape_string() expects parameter 1 to be string, array given in /home/cotton/public_html/rss001.com/includes/database.mysql.inc on line 380.
... and I really don't know why.... does anybody have any ideas?
Below is the function that is being tipped. I do know PHP (somewhat) but I don't have enough knowledge of Drupal to work out the how the view is causing this... It seems quite a basic view to me.
This is the function:
function db_escape_string($text) {
global $active_db;
return mysql_real_escape_string($text, $active_db);
}
This is the view:
$view = new view;
$view->name = 'feeds';
$view->description = 'Show a listing of all feed items for a feed';
$view->tag = 'default';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'created' => array(
'label' => 'Date published',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'date_format' => 'medium',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'teaser' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'teaser',
'table' => 'node_revisions',
'field' => 'teaser',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'tid' => array(
'label' => 'Tags',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => 'taxonomy_vtn/term/[tid-tid]',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'type' => 'separator',
'separator' => ', ',
'link_to_taxonomy' => 0,
'limit' => 0,
'vids' => array(
'6' => 0,
'7' => 0,
'8' => 0,
'9' => 0,
'10' => 0,
'11' => 0,
'13' => 0,
'14' => 0,
'15' => 0,
'17' => 0,
'18' => 0,
'19' => 0,
'20' => 0,
'21' => 0,
'22' => 0,
'23' => 0,
'24' => 0,
'25' => 0,
'26' => 0,
'27' => 0,
'28' => 0,
'29' => 0,
'46' => 0,
'31' => 0,
'32' => 0,
'33' => 0,
'34' => 0,
'35' => 0,
'36' => 0,
'37' => 0,
'3' => 0,
'47' => 0,
'38' => 0,
'39' => 0,
'40' => 0,
'41' => 0,
'42' => 0,
'43' => 0,
),
'exclude' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'view_node' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'text' => 'Read more...',
'exclude' => 0,
'id' => 'view_node',
'table' => 'node',
'field' => 'view_node',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('sorts', array(
'created' => array(
'order' => 'DESC',
'granularity' => 'second',
'id' => 'created',
'table' => 'node',
'field' => 'created',
'sortorder' => 'desc',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'feed_nid' => array(
'default_action' => 'ignore',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%1',
'breadcrumb' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'node',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'feed_nid',
'table' => 'feedapi_node_item_feed',
'field' => 'feed_nid',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'blog' => 0,
'poll' => 0,
'sparql' => 0,
'category' => 0,
'container' => 0,
'feed' => 0,
'neo_class' => 0,
'neo_property' => 0,
'neo_vocabulary' => 0,
'page' => 0,
'story' => 0,
),
'validate_argument_node_access' => 1,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'6' => 0,
'7' => 0,
'8' => 0,
'9' => 0,
'10' => 0,
'11' => 0,
'13' => 0,
'14' => 0,
'15' => 0,
'17' => 0,
'18' => 0,
'19' => 0,
'20' => 0,
'21' => 0,
'22' => 0,
'23' => 0,
'24' => 0,
'25' => 0,
'26' => 0,
'27' => 0,
'28' => 0,
'29' => 0,
'46' => 0,
'31' => 0,
'32' => 0,
'33' => 0,
'34' => 0,
'35' => 0,
'36' => 0,
'37' => 0,
'3' => 0,
'47' => 0,
'38' => 0,
'39' => 0,
'40' => 0,
'41' => 0,
'42' => 0,
'43' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
),
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'story' => 'story',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('title', 'Latest from the feeds');
$handler->override_option('header_format', '1');
$handler->override_option('footer_format', '1');
$handler->override_option('empty', 'Nothing here yet. Hold on, it\'s coming!');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_pager', '0');
$handler->override_option('use_more', 0);
$handler->override_option('use_more_text', 'read more...');
$handler->override_option('row_options', array(
'inline' => array(),
'separator' => ' ',
'hide_empty' => 1,
));
$handler = $view->new_display('page', 'Page', 'page');
$handler->override_option('items_per_page', 20);
$handler->override_option('path', 'feed-item');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('block', 'Block', 'block_2');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
Comments
Check Filters
Reference:
http://drupal.org/node/81709
---------------------------------
Steven Wright
Slalom