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

Prevent counting on null #100

Merged
merged 1 commit into from
Dec 8, 2024
Merged

Conversation

SergioMendolia
Copy link
Contributor

Salut! I got an error reported when parsing a Mobi file. This would prevent it

 "exception" => TypeError {
    #message: "count(): Argument #1 ($value) must be of type Countable|array, null given"
    #code: 0
    #file: "./vendor/kiwilan/php-ebook/src/Formats/Mobi/Parser/MobiParser.php"
    #line: 50
    trace: {
      ./vendor/kiwilan/php-ebook/src/Formats/Mobi/Parser/MobiParser.php:50 { …}
      ./vendor/kiwilan/php-ebook/src/Formats/Mobi/MobiModule.php:51 { …}
      ./vendor/kiwilan/php-ebook/src/Ebook.php:284 { …}
      ./vendor/kiwilan/php-ebook/src/Ebook.php:113 { …}

Copy link

codecov bot commented Dec 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.29%. Comparing base (b035de6) to head (32b0bb8).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #100      +/-   ##
============================================
+ Coverage     90.19%   90.29%   +0.09%     
- Complexity      830      831       +1     
============================================
  Files            32       32              
  Lines          2550     2575      +25     
============================================
+ Hits           2300     2325      +25     
  Misses          250      250              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ewilan-riviere
Copy link
Contributor

Thanks for this improvement!

@ewilan-riviere ewilan-riviere merged commit 18a63ee into kiwilan:main Dec 8, 2024
9 checks passed
ewilan-riviere added a commit that referenced this pull request Dec 8, 2024
Fix Mobi file error "Prevent counting on null", with #100 by @SergioMendolia
@ewilan-riviere ewilan-riviere mentioned this pull request Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants