Jump to content

Featured Replies

Posted

@Daniel F @Stuart Silvester

I think there's a bug on plugin install if this plugin creates a table. You should be using PHP 8 and with IN_DEV enabled. The error:

12RG1YB.png

The error happens in the step that has the \IPS\Db::i()->createTable.

If you disable the IN_DEV or install the plugin in PHP 7.4, it works just fine. Tested in several plugins, 3 installs.

Solved by Stuart Silvester

Go to solution
  • Author

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;
	}

 

  • Author
 

Your columns should have an array key that matches the column name so...

Ooh ok. I'll change it.

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

 

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

  • Author
 

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

  • No registered users viewing this page.