[buddypress-trac] [BuddyPress Trac] #6391: when i go to view a profile or anything that has to do with buddy press. this appears: <b>Warning</b>: strstr(): Empty needle in

buddypress-trac noreply at wordpress.org
Sat Jul 30 12:55:04 UTC 2016


#6391: when i go to view a profile or anything that has to do with buddy press.
this appears:  <b>Warning</b>: strstr(): Empty needle in
------------------------------+-----------------------------------
 Reporter:  scarrano1         |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  BuddyPress.org Sites
Component:  Core              |     Version:  2.2.3
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------------------
Changes (by DJPaul):

 * keywords:  has-patch => has-patch commit


Comment:

 Looks good!

 Note: for next time, we could use something like `$blogname && strstr(
 $title, $blogname )` here instead of `! empty()`.

 `empty` is good use when accessing array properties (maybe class
 properties, too) that may not be set or just empty, because it basically
 does a `isset($value['what']) && $value['what'] != null` (I don't know how
 to find language constructs in the PHP C++ source, so I can't back this
 up, but this is what my mental understanding of the empty construct has
 always done). While in this case there's no real difference, I prefer the
 more succinct approach.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6391#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list