Opened 13 years ago
Closed 13 years ago
#22420 closed defect (bug) (fixed)
Bookmarks/links Illegal string offset.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.5 | Priority: | normal |
| Severity: | normal | Version: | 3.5 |
| Component: | General | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
Warning: Illegal string offset 'categorize' in /home/pross/public_html/wp-includes/bookmark-template.php on line 213
Added quick patch.
Attachments (1)
Change History (7)
#2
@
13 years ago
Ah, yes, this is correct. We only tested with the default theme which never calls wp_list_bookmarks() with no arguments. This means $args was always an array instead of the default empty string.
This would happen though if wp_list_bookmarks() was called from other themes without any arguments.
#3
follow-up:
↓ 4
@
13 years ago
I wonder if it would be better to change the $args parameter default to array() instead. Is there a policy against using non-scalar default arguments?
#4
in reply to:
↑ 3
@
13 years ago
Replying to bpetty:
I wonder if it would be better to change the
$argsparameter default toarray()instead. Is there a policy against using non-scalar default arguments?
Nope. But I'm fine with patch.patch as it prevents further issues, like a plugin passing a scalar value in.
Introduced in [22426].