calio/form-input-nginx-module

Internal server error when using array_map_op

cwells opened this issue · 1 comments

The below config will cause "Internal Server Error" from Nginx 0.8.41:

location ~ ^/(?P<table>\w+)/(?P<id>\d+)/?$ {
    set_form_input    $columns;
    set_form_input    $values;
    array_split       ',' $values to=$array;
    array_map_op      set_quote_sql_str $array;
    array_join        ',' $array to=$sql_args;

    echo $sql_args;
}

Removing the array_map_op line allows it to complete successfully.

Test with:

curl -d "columns=username,password&values=joe,secret" http://localhost/users/1

Dammit. Meant to put this on array-var-nginx-module page. Sorry, please disregard.