* FIX 21.0: $height and $width can be ints, but also 'auto' (which is commonly used), so check for this special value before typecasting
* Update html.form.class.php
* Update html.form.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* commonobject: line_max: factor conditonals together
The SQL request is shared, except for the additional filter.
* Update commonobject.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* fix: manage correctly external module object link with myobject@mymodule element type
* add more doc in template module builder
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Simplify the code by early returning on query failure, which removes
almost every indentation level of the function.
It also highlights some important flaws here, since there is a return
without value (void return type) between the two queries if an error
happened, which would indicate the first query failed and nothing was
registered, but also an error check leading to printing an error message
if the second query fails, without actually reverting the first one, and
since there is no error code, there's no way to trigger a db->rollback()
from the caller code for this reason.
Simplify the code by early returning on query failure, which removes
almost every indentation level of the function.
It also highlights some important flaws here, since there is a return
without value (void return type) between the two queries if an error
happened, which would indicate the first query failed and nothing was
registered, but also an error check leading to printing an error message
if the second query fails, without actually reverting the first one, and
since there is no error code, there's no way to trigger a db->rollback()
from the caller code for this reason.
There's no need for the else{} block when the if block early returns,
and it helps highlighting the happy path. Note that this kind of change
only make sense when one of the block is an error, not a choice between
two possibilities.
* fix: warning Form IA and settings
* fix: warning Form IA and settings
* Update html.formmail.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>