•  
      request #19229 Possible TypeError when retrieving the integer parameter 'sys_max_size_upload'
    Infos
    #19229
    Aurélien Tisné (atisne)
    2021-01-27 13:43
    2021-01-27 12:36
    20798
    Details
    Possible TypeError when retrieving the integer parameter 'sys_max_size_upload'
    We get a blank page when viewing an artifact with an attachment and the maximum upload size is customized.

    Steps to reproduce:
    1- Customize the parameter 'sys_max_size_upload'
    insert into forgeconfig (name, value) values ('sys_max_size_upload', 536870);
    2- View an artifact with an attachment
    -> The artifact is not displayed

    PHP Fatal error: Uncaught TypeError: Return value of Tuleap\Tracker\Artifact\FileUploadData::getUploadMaxSize() must be of the type int, string returned in /usr/share/tuleap/plugins/tracker/include/Tracker/Artifact/FileUploadData.php:73

    desc forgeconfig;
    +-------+--------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-------+--------------+------+-----+---------+-------+
    | name | varchar(255) | NO | PRI | NULL | |
    | value | varchar(255) | NO | | | |
    +-------+--------------+------+-----+---------+-------+
    Trackers
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2021-01-27
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2021-01-27 13:43

    gerrit #21577 integrated into Tuleap 12.4.99.195. Thanks for the patch!

    Hard to follow. Some parameters are set in the DB and 'tuleap config-get' returns a value for every parameters.

    Agreed, it's a bit of a mess at the moment, we should probably clean it up.


    • Summary
      -TypeError when retrieving the integer parameter 'sys_max_size_upload' 
      +Possible TypeError when retrieving the integer parameter 'sys_max_size_upload' 
    • Status changed from Verified to Closed
    • Reported in version set to All
    • Connected artifacts
    • Close date set to 2021-01-27
    User avatar
    OK. Good to know.
    Hard to follow. Some parameters are set in the DB and 'tuleap config-get' returns a value for every parameters.
    User avatar
    Thomas Gerbet (tgerbet)2021-01-27 12:42
    Confirmed, thanks for the report. This one is however supposed to be set in /etc/tuleap/conf/local.inc and not manually set into the DB.

    The DB is never expected to be manually edited. If a value is not present in the configuration files of a plugin or /etc/tuleap/conf/local.inc it can be manipulated via 'tuleap config-set' (you can see the available options with tuleap config-list).

    • Status changed from New to Verified