Closed Bhadresh-Malankiya closed 1 day ago
I can confirm this issue. On this line, the result of a division (will always be a float) is given to a function that expects an int.
I am facing same issue
please help me out
TypeError: PhpOffice\PhpPresentation\Shape\RichText\Paragraph::setSpacingBefore(): Argument #1 ($spacingBefore) must be of type int, float given, called in D:\Projects\xampp8.2.4\htdocs\magento246p1\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php on line 1131 and defined in D:\Projects\xampp8.2.4\htdocs\magento246p1\vendor\phpoffice\phppresentation\src\PhpPresentation\Shape\RichText\Paragraph.php:367
@samverhoeven @Bhadresh-Malankiya @vibhavankhade Have you got a sample file with the error, please ?
@Progi1984, I'm not sure anymore which files in my repos caused this issue, so that would that me too much time. If the setSpacingBefore function really needs to receive an int, I would then cast the result of the division in PowerPoint2007 to an int. If the Paragraph can also work with the spacingBefore property being a float, I would just leave out the type hinting as long as php 7 is still supported. Or am I oversimplifying things here?
@Bhadresh-Malankiya @samverhoeven @vibhavankhade This issue has been fixed by a maintainer. You can help him by sponsoring him through Github sponsors.
TypeError PhpOffice\PhpPresentation\Shape\RichText\Paragraph::setSpacingBefore(): Argument #1 ($spacingBefore) must be of type int, float given, called in /home/pc1/Expresstech/certificates_poc/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint2007.php on line 1129
using php 8.0 with laravel 8
I was struggling to solve this from last 1 day but at last I think this is some internal library files type error, please let me know solution or fix it asap.