I'm not sure this module is actively maintained but I share the problem and solution for people who meet the same issue in the future.

Problem/Motivation

When Drupal cron runs and the hook_cron() of this module is invoked, an error occurs.

explode() expects parameter 2 to be string, array given

This occurs in the following line.

    watchdog('smart_ip_ban', 'Following IPs have been unblocked !ips', array('!ips' => explode(', ', $ips)));

Here, $ips is expected to be a string but actually an array.

Proposed resolution

I believe explode() in the above line is wrong and should be implode().

Remaining tasks

- Create a patch
- Review the patch

User interface changes

(None)

API changes

(None)

Data model changes

(None)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hgoto created an issue. See original summary.

hgoto’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
511 bytes