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

getHTML() returns calls __clone method called on non-object #42

Open
manzari opened this issue Jan 29, 2018 · 0 comments
Open

getHTML() returns calls __clone method called on non-object #42

manzari opened this issue Jan 29, 2018 · 0 comments

Comments

@manzari
Copy link

manzari commented Jan 29, 2018

Steps to reproduce:

$inlineStyleBody = new InlineStyle($body);
$cssDir = new DirectoryIterator("./css");
    foreach ($cssDir as $cssFile) {
        if ($cssFile->isDot() or $cssFile->getExtension() != 'css') {
            continue;
         };
         $inlineStyleBody->applyStylesheet($cssFile->getPathname());
    }
    file_put_contents('testout.html', $inlineStyleBody->getHTML())

Expected behavior:
Create HTML-Document with inlined css

Actual behavior:
Returning following error:


Fatal error: Uncaught Error: __clone method called on non-object in /var/www/html/vendor/inlinestyle/inlinestyle/InlineStyle/InlineStyle.php on line 397
Error: __clone method called on non-object in /var/www/html/vendor/inlinestyle/inlinestyle/InlineStyle/InlineStyle.php on line 397

Call Stack:
    [...]
    0.2193    2416360   4. InlineStyle\InlineStyle->getHTML() /var/www/html/src/MyMail.php:91
    0.2193    2416416   5. InlineStyle\InlineStyle->__clone() /var/www/html/vendor/inlinestyle/inlinestyle/InlineStyle/InlineStyle.php:180

Process finished with exit code 255
@manzari manzari changed the title getHTML returns calls __clone method called on non-object getHTML() returns calls __clone method called on non-object Jan 29, 2018
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