Button “Edit default value”

Home Forums Error reporting Button “Edit default value”

This forum is for reporting errors, bugs and malfunctions in the system.
  • Creator
    Topic
  • #5018
    Helpful
    Up
    0
    Down
    Not Helpful
    ::

    Hello,

    When trying to use the new “Edit default value” buttons this error message appears. I don’t know if I’m using it correctly.

    Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\ABCD2\www\htdocs\central\dataentry\plantilladeingreso.php on line 201
    
    Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\ABCD2\www\htdocs\central\dataentry\plantilladeingreso.php on line 203

     

    I’m using PHP 8.1.6.

     

     

     

     

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #5189
    Helpful
    Up
    0
    Down
    Not Helpful
    ::

    Fixed: https://github.com/ABCD-DEVCOM/ABCD2/pull/472

    Fix erros: PHP Deprecated: trim(): Passing null to parameter
    The error “PHP Deprecated: trim(): Passing null to parameter” appears in newer versions of PHP.

    To correct it, where it says:
    trim($tl)

    has changed to:
    trim((string)$tl)

     

    Updates compatibility for PHP versions higher than 8xx
    The error below is caused in PHP 8xx versions

    Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /ABCD2/www/htdocs/central/dataentry/fmt.php:1120 Stack trace: #0 {main} thrown in /ABCD2/www/htdocs/central/dataentry/fmt.php on line 1120

    To correct it was changed where it says:

    $tag=trim(substr($linea,0,4))*1;

    To:

    $tag=(int)trim(substr($linea,0,4))*(int)1;

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.