Error message:

warning: strpos(): Empty delimiter in /path/to/modules/activitystream-DRUPAL-6--2/activitystream.module on line 713.

* my line numbers may differ as I'm working on another patch currently, just filing this issue to resolve later
* this might already be resolved in HEAD?

  // Has the source changed? If not, we don't want to update the node
  $source_changed = ( ( $activity['title'] == $node->title || (strpos($activity['title'], $node->title) !== FALSE ) ) && $node->body == $activity['body'] ) ? false : true;

Comments

eyenology’s picture

Getting a similar error. What was the solution to this?

xurizaemon’s picture

I didn't ever look any further into this.

Basically, if $activity['title'] is empty, you don't want to even try calling strpos('', $node->title) because it will complain.

I would try replacing the line above with something like this, which checks that $activity['title'] is not empty before calling strpos(). Code below is untested and I'm sure the AS maintainer would love a patch filed on this issue if it does resolve the error for you.

Actually, I think coding standards would say that this line below is bad, because it has way too many conditions ... but I can't find anything to back that up right now.

$source_changed = ( ( $activity['title'] == $node->title || (!empty($activity['title']) && strpos($activity['title'], $node->title) !== FALSE ) ) && $node->body == $activity['body'] ) ? false : true;
 
akalsey’s picture

Status: Active » Fixed

Fixed in dev

akalsey’s picture

Status: Fixed » Closed (fixed)

In beta2