Commit 929cdb8e authored by Sven Berg Ryen's avatar Sven Berg Ryen Committed by Sven Berg Ryen
Browse files

Issue #3278043 by svenryen: Drupal 10 compatibility: \Drupal::VERSION needs to be cast to a float

parent 8e2908bd
Loading
Loading
Loading
Loading
+2 −2
Changes for eu_cookie_compliance.module: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ function eu_cookie_compliance_page_attachments(&$variables) {

  // Add javascript.
  $uri = 'public://eu_cookie_compliance/eu_cookie_compliance.script.js';
  if (\Drupal::VERSION < 9.3) {
  if ((float) \Drupal::VERSION < 9.3) {
    $url = file_url_transform_relative(file_create_url($uri));
  }
  else {
@@ -922,7 +922,7 @@ function eu_cookie_compliance_module_set_weight() {
 *   Url to transform.
 */
function _eu_cookie_compliance_convert_relative_uri(&$element) {
  if (\Drupal::VERSION < 9.3) {
  if ((float) \Drupal::VERSION < 9.3) {
    $element = preg_replace('/^\//', '', file_url_transform_relative(file_create_url($element)));
  }
  else {