Jump to content


Photo

Trim() error


If you go to the URL: http://yourdomainher...m/index.php?app[]=members it will give the following php warning:

Warning: trim() expects parameter 1 to be string, array given in C:\wamp\www\forum\admin\sources\base\ipsRegistry.php on line 1774

Status: Fixed
Version: 3.3.4
Fixed In: 3.3.5


3 Comments

Updating Status to: Confirmed - General

Was this url manually created or is it getting generated automatically somewhere? I'm having a hard time classifying this as a bug if it is caused by adjusting the URL manually. display_errors should be turned off in a production environment but I guess we can look into adjusting this.
The URL was manually created. But it is a replicatable error none the less, i fixed it by adding a simple !is_array() check to the code on line 1774.

My edit:

$_appcomponent = preg_replace( '/[^a-zA-Z0-9\-\_]/', "" , ( isset( $_REQUEST['app'] ) && !is_array($_REQUEST['app']) && trim( $_REQUEST['app'] ) ? $_REQUEST['app'] : IPS_DEFAULT_APP ) );
Updating Fixed In to: 3.3.5
Updating Status to: Fixed

-