Problem when I try to add a galley - ojs 3.1.1 (postgres)

Hi everybody.

I use postgres 9.4 and php 7.
Migrate the system from ojs 2.4.8. When I try to upload a gallery I get the following error.

PHP log:

[client 127.0.0.1:49158] PHP Warning: Declaration of IssueFileManager::downloadFile($fileId, $inline = false) should be compatible with FileManager::downloadFile($filePath, $mediaType = NULL, $inline = false, $fileName = NULL) in /var/www/html/ojs-3.1.1/classes/file/IssueFileManager.inc.php on line 0, referer: http://127.0.0.1/ojs-3.1.1/index.php/CE/workflow/index/6895/4

[Tue May 15 11:17:48.744179 2018] [:error] [pid 3360] [client 127.0.0.1:49158] ojs2: DB Error: ERROR: el valor null para la columna \xc2\xabfile_id\xc2\xbb viola la restricci\xc3\xb3n not null\nDETAIL: La fila que falla contiene (10518, es_ES, 6895, null, sada, 2, , 0)., referer: http://127.0.0.1/ojs-3.1.1/index.php/CE/workflow/index/6895/4

postgres log:

2018-05-15 11:35:16.148 -03 [16137] cristian@ojs311 LOG: ejecutar : INSERT INTO submission_galleys
(submission_id, label, locale, seq, remote_url, file_id)
VALUES
( $1, $2, $3, $4, $5, $6)
2018-05-15 11:35:16.148 -03 [16137] cristian@ojs311 DETALLE: parámetros: $1 = ‘7176’, $2 = ‘HTML_galeria’, $3 = ‘en_US’, $4 = ‘0’, $5 = ‘’, $6 = NULL
2018-05-15 11:35:16.148 -03 [16137] cristian@ojs311 ERROR: el valor null para la columna «file_id» viola la restricción not null
2018-05-15 11:35:16.148 -03 [16137] cristian@ojs311 DETALLE: La fila que falla contiene (10522, en_US, 7176, null, HTML_galeria, 0, , 0).
2018-05-15 11:35:16.148 -03 [16137] cristian@ojs311 SENTENCIA: INSERT INTO submission_galleys
(submission_id, label, locale, seq, remote_url, file_id)
VALUES
( $1, $2, $3, $4, $5, $6)
2018-05-15 11:35:16.148 -03 [16137] cristian@ojs311 LOG: ejecutar

Impant:
Screenshot_20180515_113828

Is it a problem with postgres?

Regards
Cristian