- Open on Drupal.org βCore: 7.x + Environment: PHP 5.3 & MySQL 5.5last update
over 1 year ago Waiting for branch to pass - Issue created by @MegaphoneJon
- πΊπΈUnited States MegaphoneJon
scratch that - my fix doesn't work, the issue remains
- πΊπΈUnited States MegaphoneJon
Ultimately I fixed this by changing "offset" to the very-real-not-made-up "offsetted". See diff below. This also required me to change the SQL structure with
ALTER TABLE block_inject_exceptions RENAME COLUMN `offset` TO offsetted
. Given how few people use this module, and given that those sites are probably zombies that will never see PHP 8 (or else I wouldn't be the first to find this!), I'm not going to write a proper upgrade script. But anyone who has this problem can find the solution here.diff --git a/sites/all/modules/contrib/block_inject/block_inject.module b/sites/all/modules/contrib/block_inject/block_inject.module index 9a2e24aa..c986d1f0 100644 --- a/sites/all/modules/contrib/block_inject/block_inject.module +++ b/sites/all/modules/contrib/block_inject/block_inject.module @@ -713,7 +713,7 @@ function block_inject_insert_exception($nid, $bi_id, $exception, $offset = NULL) $query = db_update('block_inject_exceptions') ->fields(array( 'except_injection' => $exception, - 'offset' => $offset, + 'offsetted' => $offset, )) ->condition('nid', $nid) ->execute(); @@ -724,7 +724,7 @@ function block_inject_insert_exception($nid, $bi_id, $exception, $offset = NULL) 'bi_id' => $bi_id, 'nid' => $nid, 'except_injection' => $exception, - 'offset' => $offset, + 'offsetted' => $offset, )) ->execute(); } @@ -772,9 +772,9 @@ function block_inject_green_light($nid) { */ function block_inject_get_offset($nid) { $result = db_select('block_inject_exceptions', 'bie') - ->fields('bie', array('offset')) + ->fields('bie', array('offsetted')) ->condition('nid', $nid) - ->isNotNull('offset') + ->isNotNull('offsetted') ->execute() ->fetchAssoc(); return $result;