1

Topic: Warning: array_map(): Argument #2 should be an array

Hi,

I'm trying to install PunBB 1.2.12.

When I try to change the board name I get:

> Warning: array_map(): Argument #2 should be an array in [base url]/admin_options.php on line 44

...at the top of the page, then later:

> You must enter a board title.

> Go back

This obviously isn't very helpful. Any thoughts on what is going wrong?

Some environment details:

    Operating system: Linux
    PHP: 4.3.10 - Show info
    Accelerator: N/A

Database:

    MySQL 3.23.58
    Rows: 83
    Size: 218.52 KB

Many thanks,

--
Ian

Re: Warning: array_map(): Argument #2 should be an array

Might be your mysql version. Although this is what the install.html file says:

Requirements

    * A webserver (preferably Apache).
    * PHP 4.1.0 or later (PHP 5 included).
    * MySQL 3.23.17 or later, PostgreSQL 7.0 or later or SQLite. (see details below).

MySQL: PunBB will not work at all with any version prior to 3.23.17.

PostgreSQL: PunBB 1.2.* has been thoroughly tested on various versions between 7.3.3 and 7.4.5, but it should work fine with any version greater than 7.0. Please note that PHP 4.3.0 or later is required for PostgreSQL support.

SQLite: PunBB 1.2.* has only been thoroughly tested on versions 2.8.11 and 2.8.14 of SQLite, but should work with basically any version.

3

Re: Warning: array_map(): Argument #2 should be an array

Thanks for the response. MySQL and php are the latest versions available via the Red Hat Network. Given this is the case, I would expect PunBB to work with them as install.html suggests... :-(

Re: Warning: array_map(): Argument #2 should be an array

Hrmm... it seems you don't support using a HTML array. Why, I don't know tongue
What browser are you using?

5

Re: Warning: array_map(): Argument #2 should be an array

Various - including Firefox 1.5.0.4 and IE7b3.

Re: Warning: array_map(): Argument #2 should be an array

Odd. Have you made any changes to that file? (changed names of fields etc)

7

Re: Warning: array_map(): Argument #2 should be an array

No - and I've attempted to install every version of PunBB from 1.2.1.

Re: Warning: array_map(): Argument #2 should be an array

Could you, before line 44 ($form = array_map('trim', $_POST['form']);) add this:

echo '<pre>';
var_dump($_POST['form']);
echo '</pre>';

And tell me what it says (hide confidential info, if any).

9

Re: Warning: array_map(): Argument #2 should be an array

Hi,

I've worked it out - I'd installed a php anti-spam script that was causing a conflict.

Thanks for your help :-)

--
Ian

Re: Warning: array_map(): Argument #2 should be an array

Ok, no problem smile

11

Re: Warning: array_map(): Argument #2 should be an array

Seriously, thanks - your help got me thinking in the right direction. Otherwise I'd still be sitting here looking puzzled and frustrated. Thanks.