Closed (fixed)
Project:
Activity Stream
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2010 at 21:10 UTC
Updated:
28 Nov 2010 at 07:39 UTC
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
Comment #1
eyenology commentedGetting a similar error. What was the solution to this?
Comment #2
xurizaemonI 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.
Comment #3
akalsey commentedFixed in dev
Comment #4
akalsey commentedIn beta2