Posted by wxman on September 23, 2012 at 5:34pm
4 followers
Jump to:
| Project: | AdaptiveTheme |
| Version: | 7.x-3.1 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I'm getting a bunch of PHP errors every time the cron runs. I can't seem to track down what is causing them all, but one of the is this:Warning: Cannot use a scalar value as an array in adaptivetheme_page_alter() (line 235 of /var/www/vhosts/tlthost.net/httpdocs/sites/all/themes/at_core/inc/alter.inc).
I'm hoping maybe if you folks know what's causing this one, it might help me figure out the rest of the errors.
Comments
#1
Can you post all the errors, or a bunch of them - that one is coming from adaptivetheme_page_alter(), it calls at_get_browser() which is a wrapper for browscap_get_browser and should return true/false not an array so no need to initialize $page['is_mobile'] as an array. Weird.
#2
Here's what I get:
Cannot use a scalar value as an array in drupal_render() (line 5822 of /var/www/vhosts/tlthost.net/httpdocs/includes/common.inc).Cannot use a scalar value as an array in drupal_render() (line 5767 of /var/www/vhosts/tlthost.net/httpdocs/includes/common.inc).
Invalid argument supplied for foreach() in element_children() (line 6300 of /var/www/vhosts/tlthost.net/httpdocs/includes/common.inc).
Cannot use a scalar value as an array in adaptivetheme_page_alter() (line 235 of /var/www/vhosts/tlthost.net/httpdocs/sites/all/themes/at_core/inc/alter.inc).
Cannot use a scalar value as an array in user_relationships_ui_page_alter() (line 247 of /var/www/vhosts/tlthost.net/httpdocs/sites/tlt/modules/user_relationships/user_relationships_ui/user_relationships_ui.module).
Cannot use a scalar value as an array in fbconnect_page_alter() (line 568 of /var/www/vhosts/tlthost.net/httpdocs/sites/all/modules/fbconnect/fbconnect.module).
Cannot use a scalar value as an array in block_page_build() (line 269 of /var/www/vhosts/tlthost.net/httpdocs/modules/block/block.module).
The last one, array in block_page_build() line 269, comes up 4 or 5 times.
I thought I tracked it down to something in my template.php, but that didn't pan out.
#3
I can't really see this as a theme issue, if you look most of the notices are coming from things within Drupal core, I would try clearing your cache and possibly saving some module and theme settings again, you can see facebook connect has a problem also - but these are not typical issues or bugs I would think, just an odd problem with your installation.
#4
I'm getting these as well in my log but not as a warning/error on a page:
I am using a custom/starter subtheme of AdaptiveTheme but it looks like it may be something else, dunno, just posting here as I just noticed these showing up in my log and haven't been able to find anywhere else they're mentioned.
If it's of any help, I'm currently trying to track down why I'm also having issues with batch operations (all but module update checking) not showing up and performing, therefore failing but without any error message, just no progress bar or progress but the page does completely load.
#5
I took Jeff's advice and re-saved a bunch of the modules, but that didn't help. It really is a mystery.
#6
Hi,
I am working with AT too.
And got the same errors - without tellinig now, that is because I use AT.
Anyway, I will do some test and try to find out what is going oin behind that PHP messages.
best,
fr
#7
Can you guys tell me which version of Browscap you are using, if any?
#8
I might suggest that in get.inc in the core theme (look in adaptivetheme/at_core/inc/get.inc) right down the bottom of that file look for the function:
at_get_broswer()and replace the line:
if ($browser['ismobiledevice'] == 1)with...
if ($browser['ismobiledevice'] == TRUE)#9
I'm using browscap 7.x-1.3