Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed null parameter warning in Mage_Shipping_Model_Resource_Carrier_Tablerate #4073

Merged
merged 3 commits into from
Jul 4, 2024

Commits on Jul 3, 2024

  1. Deprecated functionality: strlen() in Tablerate.php

    In order to reproduce this issue use a table rate in your test environment then follow the checkout steps to the end. Starting with PHP 8.1 to 8.3 you will get this error in the OM log file.
    
    ```
    Deprecated functionality: strlen(): Passing null to parameter #1 ($string) of type string is deprecated  in /var/www/html/app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php on line 131
    ```
    
    My approach is using strlen($variable ?? '') but it could be strlen((string) $variabile) too. I am open to opinions.
    addison74 authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    ba21954 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. Update Tablerate.php

    addison74 authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    2116186 View commit details
    Browse the repository at this point in the history
  2. Update Tablerate.php

    addison74 authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    0fb0de0 View commit details
    Browse the repository at this point in the history