Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 1, 2024Nov 1 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
November 2, 2024Nov 2 Author 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; }
November 2, 2024Nov 2 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 November 2, 2024Nov 2 by teraßyte
November 2, 2024Nov 2 Author 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