Jump to content

Recommended Posts

Posted

I get this error when attempting the code for my app

Type of IPS\arcade\Member::$multitons must be array (as in class IPS\Patterns\ActiveRecord) in /home/ipsproarcade/public_html/testboard/applications/arcade/sources/Member/Member.php on line 85

Which is in direct relation to this code

protected static $multitons;

I have looked but cannot find an answer on how to correct this, could someone please help

Posted

Happened upon another error that I cannot see my way clear on, I get the following error, any help would be appreciated (learning as I go)

TypeError: IPS\Http\Url::internal(): Argument #1 ($queryString) must be of type string, null given, called in /home/ipsproarcade/public_html/testboard/applications/arcade/sources/Library/Library.php on line 2086 (0)

Which refers me to this section of the app code

	function startForm( $hiddens = '', $name = 'theAdminForm', $js = '', $id = '' )
	{
		if ( !$id )
		{
			$id = $name;
		}
		$form = "<form action='" . \IPS\Http\Url::internal( NULL ) . "' method='post' name='$name' $js id='$id'>";
		if ( \is_array( $hiddens ) )
		{
			foreach ( $hiddens as $v )
			{
				$form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}' />";
			}
		}
		return $form;
	}

 

Posted (edited)

The problem is this line:

\IPS\Http\Url::internal( NULL )

Try this instead:

\IPS\Http\Url::internal( '' )

 

===

Also, if you're expecting $hiddens to be an array, don't initialize it as an empty string:

function startForm( $hiddens = array(), $name = 'theAdminForm', $js = '', $id = '' )

 

However, I see no point in starting a form with that function.

Can't you use the \IPS\Helpers\Form class? It does the same and is entirely handled by the framework. 🤨

Edited by teraßyte
Posted

The first corrected the error, thanks and no idea how to make the change on your recommendation 😔

Quote

However, I see no point in starting a form with that function.

Can't you use the \IPS\Helpers\Form class? It does the same and is entirely handled by the framework

  • Recently Browsing   0 members

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