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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dirksonii’s picture

I get this too.

Bojhan’s picture

Priority: Normal » Critical

This happens with every possible install, I tried.

adaddinsane’s picture

Priority: Critical » Normal
Issue summary: View changes

It'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".

manuelBS’s picture

Status: Active » Needs review
FileSize
538 bytes

I 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.

Uccio’s picture

Freelinking 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

gisle’s picture

Version: 7.x-3.2 » 7.x-3.3
Status: Needs review » Closed (cannot reproduce)

Cannot reproduce.

Looks like this one has been committed 7.x-3.3.

ety’s picture

Hi,
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]) {

gisle’s picture

@ety, can you tell is what error messages you get and where (file name and line number) your quick fix is located?