Unyson
Unyson copied to clipboard
Warning: Invalid argument supplied for foreach() in plugins/unyson/framework/helpers/general.php on line 1275
This bug just occured on our website zmenaprohradec.cz. I cant find any solution to this. Could you please help me?
Same problem here. Looks like Google Fonts API key is invalid on unyson cache site. Tried to generate my own api key and change url directly to google, but it looks like the old response is saved in some kind of cache. Idea how to clear the cache?
I have the same issue but don't know if it has to do with Google fonts or not... did you get this to resolve? See the error here: https://customerloyaltyaccelerator.com/
Same Issue Here mine is Warning: Invalid argument supplied for foreach() in /home/harvestc/public_html/wp-content/plugins/unyson/framework/includes/option-types/typography-v2/class-fw-option-type-typography-v2.php on line 148
Any update on how to fix this issue?
Any updates?
Hi there. Same issue on my site. Cannot access the font area either to change it. Looks hideous. When will there be a fix? Thanks
EDIT: I rolled back to a back up from a few days ago for what I think is a temporary fix.
Same error on my website as well! I am not sure if I can/should use a backup of a certain plugin or the whole page.
Anybody who can help? Looks pretty shitty on a business website.
Ok, I have some advice. It is not the solution and it is pretty shitty advice. I needed to hide the warning at least and this works so far. Go to /framework/helpers/general.php and delete rows from 1262 to 1292. The warning is gone and any new bugs did not occur.
Hello my solution: https://github.com/ThemeFuse/Unyson/issues/4261#issuecomment-1223924349
Ok, I have some advice. It is not the solution and it is pretty shitty advice. I needed to hide the warning at least and this works so far. Go to /framework/helpers/general.php and delete rows from 1262 to 1292. The warning is gone and any new bugs did not occur.
Yeah not a good idea :-D, i guess plugin will have problems to load fonts. Better would be hide error reporting by adding this to the top of your index.php (after <?php tag)
ini_set('display_errors', 0); ini_set('display_startup_errors', 0); error_reporting(0);
Ok, I have some advice. It is not the solution and it is pretty shitty advice. I needed to hide the warning at least and this works so far. Go to /framework/helpers/general.php and delete rows from 1262 to 1292. The warning is gone and any new bugs did not occur.
Yeah not a good idea :-D, i guess plugin will have problems to load fonts. Better would be hide error reporting by adding this to the top of your index.php (after <?php tag)
ini_set('display_errors', 0); ini_set('display_startup_errors', 0); error_reporting(0);
Hard times require hard measures. :-) I will use your real solution. Looks much better :-) Thanks!
This solution will make the error go away, but fonts will still not be loaded. Just need to add an (array) to this section in your code.
foreach ( (array) $g_fonts['items'] as $font ) { $fonts[ $font['family'] ] = array( 'family' => $font['family'], 'variants' => $font['variants'], 'position' => isset( $old_fonts[ $font['family'] ] ) ? $old_fonts[ $font['family'] ]['position'] : 99999 );
No more errors on my website.
This solution will make the error go away, but fonts will still not be loaded. Just need to add an (array) to this section in your code.
foreach ( (array) $g_fonts['items'] as $font ) { $fonts[ $font['family'] ] = array( 'family' => $font['family'], 'variants' => $font['variants'], 'position' => isset( $old_fonts[ $font['family'] ] ) ? $old_fonts[ $font['family'] ]['position'] : 99999 );
No more errors on my website.
Real solution https://github.com/ThemeFuse/Unyson/issues/4261#issuecomment-1223924349