Open tonystar opened 9 years ago
Hi Tony,
I left a comment in the commit too and I believe I've just fixed this issue.
The problem happens when using Panels IPE. If you look into file panels/panels_ipe/panels_ipe.module at lines 139 and 204, you’ll see that only line 139 adds a class as a string instead of an array.
So, I changed the code so that it first checks whether $vars[‘attributes’][‘class’] is an array. If it holds a string, then turn it into an array, add the existing class and then continue with adding the ‘list-unstyled’ class.
I ran into this issue on my own website (condurachi.ro) and I thought I’d give a helping hand. I really like your theme.
Regards, Andrei
I tried syncing my commit to your repo but it looks like I don't have the right permissions. Here's the code change that I did to solve the issue:
function tweme_preprocess_links(&$vars) {
if(!is_array($vars['attributes']['class'])) {
$temp_value = $vars['attributes']['class'];
# Transform the class to an array
$vars['attributes']['class'] = array();
# Add the existing value to the class array
$vars['attributes']['class'][] = $temp_value;
} $vars['attributes']['class'][] = 'list-unstyled'; }
Fatal error: [] operator not supported for strings in /tweme/template.php on line 111