Jump to content

Error on plugin install in PHP 8


Go to solution Solved by Stuart Silvester,

Recommended Posts

Posted

One of them:

	public function step1()
	{
		\IPS\Db::i()->createTable( array(
			'name'		=> 'savedactionssorting_mm',
			'columns'	=> array(
				array(
					'name'			=> 'sas_mm_id',
					'type'			=> 'smallint',
					'length'		=> 6,
					'allow_null'		=> false,
					'auto_increment'	=> false,
					'default'		=> 0
				),
				array(
					'name'			=> 'sas_mm_position',
					'type'			=> 'smallint',
					'length'		=> 6,
					'allow_null'		=> false,
					'default'		=> 0
				),
			),
			'indexes'	=> array(
				array(
					'type'		=> 'primary',
					'columns'	=> array( 'sas_mm_id' )
				)
			)
		)	);

		return TRUE;
	}

 

Posted (edited)
3 hours ago, sobrenome said:

Is it already safe to use php 8 with IPS 4.6?

Yes. IPS 4.6 supporting PHP 8, but be careful from third-party plugins or applications because some of them might have issues will lead to error HTTP 500. If you do have this issue, you must report it to the third-party developer. 

Edited by Afrodude
Posted
11 hours ago, Stuart Silvester said:

You're better off to use an Application if you're creating tables anyway, all this is handled automatically (as well as the database checker and uninstallation)

That’s ok as long as you use the plugin uninstall to drop your table. Also, it works fine (no log error and table is created) with IN_DEV disabled so it’s ok.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...