Jump to content

PHP 8+ HexToRGB plugin


Go to solution Solved by Stuart Silvester,

Recommended Posts

On PHP 8 the opacity option for the HexToRGB plugin is failing:

		if ( isset( \IPS\Theme::i()->settings[ $opacity ] ) )
		{
			$opacity = \IPS\Theme::i()->settings[ $opacity ];
		}

		/* If a regular setting key has been passed in, then use that as the opacity */
		if ( isset( \IPS\Settings::i()->$opacity ) )
		{
			$opacity = \IPS\Settings::i()->$opacity;
		}

If you pass through a standard setting (not theme setting), on the theme setting check you'll get crashes with an undeclared constant:

Undefined constant "IPS\Theme\my_transparency_setting"

This may, or may not, have been happening IN_DEV for years, but it's now in production on PHP 8 as well (reported the IN_DEV hitch YEARS ago, was told working, and have been routing around it with an IN_DEV plugin since then that just makes the check for the setting opacity first and then just does the numerical conversion there before passing to the output plugin)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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