From f6a0dda08fa1544987503b57db105b4415030ce5 Mon Sep 17 00:00:00 2001 From: berdir <berdir@214652.no-reply.drupal.org> Date: Mon, 8 Jun 2015 16:18:28 -0500 Subject: [PATCH] Issue #2499973 by Berdir: Remove usage of getSystemPath(), fixing compatibility with PHP7. --- src/Tests/TokenBlockTest.php | 2 +- token.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tests/TokenBlockTest.php b/src/Tests/TokenBlockTest.php index c34b48b..6aefd96 100644 --- a/src/Tests/TokenBlockTest.php +++ b/src/Tests/TokenBlockTest.php @@ -51,7 +51,7 @@ class TokenBlockTest extends TokenTestBase { $block = $this->drupalPlaceBlock('block_content:' . $block_content->uuid(), array( 'label' => '[user:name]', )); - $this->drupalGet($block->getSystemPath()); + $this->drupalGet($block->urlInfo()); $this->drupalPostForm(NULL, array(), t('Save block')); // Ensure token validation is working on the block. $this->assertText('The Title is using the following invalid tokens: [user:name].'); diff --git a/token.module b/token.module index 38644c3..5e4b7fa 100644 --- a/token.module +++ b/token.module @@ -562,7 +562,7 @@ function token_get_invalid_tokens($type, $tokens) { * ); * @endcode */ -function token_element_validate(&$element, FormStateInterface $form_state) { +function token_element_validate($element, FormStateInterface $form_state) { $value = isset($element['#value']) ? $element['#value'] : $element['#default_value']; if (!Unicode::strlen($value)) { -- GitLab