Opened 10 years ago
Closed 8 years ago
#6391 closed defect (bug) (fixed)
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
Reported by: | scarrano1 | Owned by: | tw2113 |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | 2.2.3 |
Component: | Core | Keywords: | has-patch commit |
Cc: |
Description
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 <b>/home3/filmfilm/public_html/wp-content/plugins/buddypress/bp-core/bp-core-filters.php</b> on line <b>641</b>
this appears as the name of my tab. as the <title> when i go to view source. what does this mean and how do i get rid of it?
Attachments (1)
Change History (9)
#5
@
8 years ago
- Keywords commit added
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.
Part of the bp_modify_page_title() function. The only way I'm seeing this be a potential issue is via either a filter on the
bloginfo
hook or if a user has no set theblogname
option in their General settings.Regardless of method to provide an empty string, may not be a bad idea to change
to
Will diff it up when I can fetch a fresh copy of master.