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

Uncaught Error: Call to a member function toStyle() on null in /vendor/henck/rtf-to-html/src/Html/State.php:68 Stack trace: #0 #93

Open
bootexe opened this issue Oct 19, 2022 · 0 comments

Comments

@bootexe
Copy link

bootexe commented Oct 19, 2022

Hi thanks for your code ! but I have encounter this error while using your composer package
it seems the error doesn't come from my part of the code
i am using php 8.1.11 and the RTF document has been generated using TextEdit on MacOS BigSur
the parser debugger doesn't provide any more information on this error

for now I have remove the font style support of the code and its working perfectly
Thank again

Warning: Undefined array key 0 in /vendor/henck/rtf-to-html/src/Html/State.php on line 67

Removed lines :

    if(isset($this->font)) {
      $font = self::$fonttbl[$this->font];
      $style .= $font->toStyle();
    }

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

No branches or pull requests

1 participant