Whenever i save a node im getting this error.
Warning: ksort() expects parameter 1 to be array, null given in ksort() (line 3114 of .../includes/common.inc). =>
Using krumo backtrace it suggests the error comes from this module.
Particularly where it adds inline CSS for fonts loaded via AJAX.
Fonts are working but im still getting this error. Any ideas why?
here is the backtrace:
... (Array, 11 elements)
10: ksort() (Array, 1 element)
9: drupal_group_css() (Array, 2 elements)
8: drupal_pre_render_styles() (Array, 2 elements)
7: drupal_render() (Array, 2 elements)
6: fonts_com_ajax_render_alter() (Array, 2 elements)
5: drupal_alter() (Array, 2 elements)
4: ajax_render() (Array, 2 elements)
3: ajax_deliver() (Array, 2 elements)
2: drupal_deliver_page() (Array, 2 elements)
1: menu_execute_active_handler() (Array, 2 elements)
0: main() (Array, 2 elements)| Comment | File | Size | Author |
|---|---|---|---|
| #2 | fontyourface-Warning_ksort_expects_parameter_1_to_be_array_null_given-1696438-2.patch | 820 bytes | Drave Robber |
Comments
Comment #1
Drave Robber commentedYes, at least a guess: drupal_group_css() somewhat optimistically assumes each CSS item will have a browser settings array (
$item['browsers']). This is indeed always true for CSS added viadrupal_add_css()as it ensures there is at least an empty array; in case of AJAX loading, we need to ensure that ourselves at some point.I'll get to setting up a test install and some poking tomorrow, perhaps.
Comment #2
Drave Robber commentedAttached patch fixes it for me (I was able to reproduce this warning only on enabling/disabling fonts however).
Test with caution as this seems almost too easy to be true.
Comment #3
sreynen commentedLooks good to me. I didn't really know what I was doing when writing that AJAX alter, so it doesn't surprise me I missed something like that.
Comment #4
sreynen commentedFix committed.
Comment #5
inventlogic commentedThis error occurs when using Display Suite and configuring the Layout of content types.
Just a note for other users.