Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Trying to access array offset on value of type null

Open MKtwentyone opened this issue 2 years ago • 3 comments

Hello, there is the following code on our website: Warning: Trying to access array offset on value of type null in /home/.sites/352/site4814742/web/wp-content/plugins/unyson/framework/includes/option-types/typography-v2/class-fw-option-type-typography-v2.php on line 148

What can we do? This our domain: https://www.mofive.marketing

MKtwentyone avatar Aug 21 '22 18:08 MKtwentyone

I had the same problem yesterday. The plugin depends on the unyson.io website itself which was not renewed and was discontinued. Today it was apparently renewed but the problem continued on my website. The solution was to restore the website through a backup you have from days gone by. Greetings.

oscarleonz avatar Aug 22 '22 04:08 oscarleonz

I have the same problem on my website I would to resolve this please

Tom2710 avatar Aug 22 '22 09:08 Tom2710

Hi!, I removed the warning by adding the following code before the foreach on line 147, don't forget to close the if, line 153.

145 public function get_google_font( $font ) { 146 $fonts = $this->get_fonts(); 147 if (empty($fonts) === false && empty($g_font) === false) { 148 foreach ((array) $fonts['google']['items'] as $g_font ) { 149 if ( $font === $g_font['family'] ) { 150 return $g_font; 151 } 152 } 153 } 154 return false; 155 }

corzel avatar Dec 02 '22 16:12 corzel