Fatal error :-(


#1

Hi Folks,

I’m new to this, I have spent literally the last 7 hours straight on my day off sorting out domain, hosting, learning WP and then designing a website.

I just activated all the required plugins and it now has a fatal error, I can’t even log in to disable the plugin.

Fatal error: 'break' not in the 'loop' or 'switch' context in /homepages/25/d604285276/htdocs/clickandbuilds/EE15/wp-content/plugins/types/embedded/common/toolset-forms/lib/adodb-time.inc.php on line 1012

Does this mean I now need to delete the site from my hosting and re-install, start over?

And if so, which plug in do I need to not install next time and what functionality will be affected by its absence?

Thank you,

Yours frustratedly EE-100.


#2

Fatal error: ‘break’ not in the ‘loop’ or ‘switch’ context in /homepages/25/d604285276/htdocs/clickandbuilds/EE15/wp-content/plugins/types/embedded/common/toolset-forms/lib/adodb-time.inc.php on line 1012


#3

Hello there,

Thank you for reporting.

I noticed that the error is produced by Types plugin in the following lines of plugins/types/embedded/common/toolset-forms/lib/adodb-time.inc.php file.

function adodb_tz_offset($gmt,$isphp5)
{
	$zhrs = abs($gmt)/3600;
	$hrs = floor($zhrs);
	if ($isphp5) 
		return sprintf('%s%02d%02d',($gmt<=0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); 
	else
		return sprintf('%s%02d%02d',($gmt<0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); 
	break;
}

Unfortunately we don’t have authority to fix it directly since it isn’t not part of our product we developed. Head on here. The plugin author had provided an answer already.

If you are considering to fix it by yourself, try the following.

  1. Open plugins/types/embedded/common/toolset-forms/lib/adodb-time.inc.php
  2. Find the following code block
function adodb_tz_offset($gmt,$isphp5)
{
	$zhrs = abs($gmt)/3600;
	$hrs = floor($zhrs);
	if ($isphp5) 
		return sprintf('%s%02d%02d',($gmt<=0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); 
	else
		return sprintf('%s%02d%02d',($gmt<0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); 
	break;
}

then change it into the following

function adodb_tz_offset($gmt,$isphp5)
{
	$zhrs = abs($gmt)/3600;
	$hrs = floor($zhrs);
	if ($isphp5){ 
		return sprintf('%s%02d%02d',($gmt<=0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); 
	}else{
		return sprintf('%s%02d%02d',($gmt<0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); 
	}
	return;
}
  1. Upload the changes through FTP or cPanel

Let me know how it goes. I’ll wait to hear back from you regarding your stats.

Warmest regards,
Kharis


#4

Hi,

got this Fatal Error too. It seems to vanish with update of the Types-plugin on version 1.9

Kind regards J.Benn


#5

Hello @jbenn,

Please refer here. Let me know hos it helps.

Regards,
Kharis