Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 7.15, Freelinking 7.x-3.2: added Freelinking to Filtered HTML. When content is displayed (whether or not freelink codes are included) a long list of warning messages is displayed:
Warning: Illegal string offset 'enabled' in _freelinking_process() (line 90 of D:\Web Stuff\www\scathophagids\sites\all\modules\freelinking\freelinking.module).
Comment | File | Size | Author |
---|---|---|---|
#5 | freelinking-warning-with-newer-php-version-1762090-4.patch | 763 bytes | Uccio |
#4 | freelinking-warning-with-newer-php-version-1762090-3.patch | 538 bytes | manuelBS |
Comments
Comment #1
dirksonii CreditAttribution: dirksonii commentedI get this too.
Comment #2
Bojhan CreditAttribution: Bojhan commentedThis happens with every possible install, I tried.
Comment #3
adaddinsaneIt's not a critical error because it doesn't prevent the code from operating correctly. It is annoying however.
Quick patch: Replace line 90:
if ($plugin['enabled']
with
if (!empty($plugin['enabled'])
The warning is due to PHP becoming stricter, and the code being too "relaxed".
Comment #4
manuelBS CreditAttribution: manuelBS commentedI confirm that this fix helps. Would be great if we can get it committed as it is only a small fix. Here is the patch.
Comment #5
Uccio CreditAttribution: Uccio commentedFreelinking 7.x-3.2 does not work on PHP 5.4 and shows a lot of:
Warning: Illegal string offset 'enabled' in _freelinking_process() (line 90 of D:\Web Stuff\www\scathophagids\sites\all\modules\freelinking\freelinking.module).
The proposed fix #4 solves only the warning problem but the input filter not work correctly, in attachment a tested patch that work on PHP 5.2 & PHP 5.4
Comment #6
gisleCannot reproduce.
Looks like this one has been committed 7.x-3.3.
Comment #7
ety CreditAttribution: ety commentedHi,
I get the same issue too.
I'm using drupal 7.31 with freelinking 7.x-3.4.
To avoid it I made the following quick fix:
while (TRUE) {
if (isset($remain['0']) && isset($remain['1']) && '[' == $remain[0] && '[' == $remain[1]) {
Comment #8
gisle@ety, can you tell is what error messages you get and where (file name and line number) your quick fix is located?