Commit a6d45567 authored by Dries's avatar Dries
Browse files

Issue #1854540 by Berdir: Array to string conversion warnings for some tests with PHP 5.4.

parent 3721a6c5
......@@ -97,13 +97,14 @@ public function save(array $form, array &$form_state) {
$category = $this->getEntity($form_state);
$status = $category->save();
$uri = $category->uri();
if ($status == SAVED_UPDATED) {
drupal_set_message(t('Category %label has been updated.', array('%label' => $category->label())));
watchdog('contact', 'Category %label has been updated.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), $category->uri() . '/edit'));
watchdog('contact', 'Category %label has been updated.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), $uri['path'] . '/edit'));
}
else {
drupal_set_message(t('Category %label has been added.', array('%label' => $category->label())));
watchdog('contact', 'Category %label has been added.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), $category->uri() . '/edit'));
watchdog('contact', 'Category %label has been added.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), $uri['path'] . '/edit'));
}
// Update the default category.
......
......@@ -164,7 +164,7 @@ function testTrackerNewComments() {
$node = $this->drupalCreateNode(array(
'comment' => 2,
'title' => array(LANGUAGE_NOT_SPECIFIED => array(array('value' => $this->randomName(8)))),
'title' => $this->randomName(8),
));
// Add a comment to the page.
......
......@@ -201,7 +201,7 @@ public function testFieldTokens() {
$random_text = $this->randomName();
$job_field->setTestValue($random_text);
$output = $job_field->advanced_render($row);
$this->assertSubString($output, $random_text, format_string('Make sure the self token (!value) appears in the output (!output)'. array('!value' => $random_text, '!output' => $output)));
$this->assertSubString($output, $random_text, format_string('Make sure the self token (!value) appears in the output (!output)', array('!value' => $random_text, '!output' => $output)));
}
/**
......
......@@ -1336,7 +1336,9 @@ function views_ui_add_item_form($form, &$form_state) {
$view->getStandardButtons($form, $form_state, 'views_ui_add_item_form', t('Add and configure @types', array('@types' => $ltitle)));
// Remove the default submit function.
$form['buttons']['submit']['#submit'] = array_diff($form['buttons']['submit']['#submit'], array(array($view, 'standardSubmit')));
$form['buttons']['submit']['#submit'] = array_filter($form['buttons']['submit']['#submit'], function($var) {
return !(is_array($var) && isset($var[1]) && $var[1] == 'standardSubmit');
});
$form['buttons']['submit']['#submit'][] = array($view, 'submitItemAdd');
return $form;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment