Replies: 1   Views: 1172
File edit not working
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 dedicatedworkhorse  · 23-01-2020 - 19:21

I have tried numerous ways to test this and the following is always my result.

Fatal error: Can't use function return value in write context in D:\\include\phpdocx\classes\TransformDocAdvHTML.php on line 3199


It doesn't matter if I use my code or the code that came with the software. Go to D:\\include\phpdocx\examples\FormatConverstion\trasformDocAdvHTML\sample_1.php  or sample_2.php and I get the same error.


Am I doing something wrong?

Posted by admin  · 23-01-2020 - 19:46


What version of PHP are you using? PHP 5.4 or previous?

Although we recommend you to update to a newer version of PHP (5.6 or 7), to fix it with old versions of PHP, please edit classes/TransformDocAdvHTML.php and replace that line (3099):

if ($this->complexField !== null && $this->complexField['type'] == 'FORMTEXT' && !empty(trim($childNode->nodeValue))) {


$childNodeValue = trim($childNode->nodeValue);
if ($this->complexField !== null && $this->complexField['type'] == 'FORMTEXT' && !empty($childNodeValue)) {