Forum


Replies: 2   Views: 1388
Php warning: undefined variable $descr in html2wordml.php
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by LucasSpl  · 08-03-2021 - 15:19

Hi,

i got the error

[08-Mar-2021 16:09:53 Europe/Paris] PHP Warning:  Undefined variable $descr in [...]/PhpDocx/classes/HTML2WordML.php on line 1455
[08-Mar-2021 16:09:53 Europe/Paris] PHP Warning:  Undefined variable $descr in [...]/PhpDocx/classes/HTML2WordML.php on line 1457

where i use

require_once(__DIR__ . '/PhpDocx/classes/CreateDocx.php');

$docx = new CreateDocx();
$docx->embedHTML($html);

$cheminDocx = DIR_TMP . getUniqId();
$docx->createDocx($cheminDocx);

 

$html got the value

<p><img src="data:image/png;base64,[...]" alt="" width="321" height="320" />texte</p>

if the link is not dead, you can check the base64 on https://textup.fr/534353xg (it's just a duck meme, any base64 img would have the error)
 

I'm using Premium 11

Regards.