Skip to content

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

@bootexe

Description

@bootexe

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();
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions