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

Astroid 2.6.4 Issues with PHP8.1 #322

Closed
WM-Loose opened this issue Apr 27, 2023 · 11 comments · Fixed by #393
Closed

Astroid 2.6.4 Issues with PHP8.1 #322

WM-Loose opened this issue Apr 27, 2023 · 11 comments · Fixed by #393
Labels
bug Something isn't working

Comments

@WM-Loose
Copy link

Warning: unpack(): Type n: not enough input, need 2, have 0 in /www/root/account/joomla/libraries/astroid/framework/library/FontLib/BinaryStream.php on line 218

Warning: Trying to access array offset on value of type bool in /www/root/account/joomla/libraries/astroid/framework/library/FontLib/BinaryStream.php on line 219

@Chacapamac
Copy link
Collaborator

Just Label, Cannot test yet

@Chacapamac Chacapamac added the bug Something isn't working label Apr 29, 2023
@WM-Loose
Copy link
Author

the php errors also appear in php8.0

@Chacapamac
Copy link
Collaborator

Ok, I just realize that my test environment is PHP 8.1.18 —> http://joom4-astro.graf-test.ca/

Curiously, I do not see these Warnings in my console ( Warnings are on???)

@WM-Loose
Copy link
Author

WM-Loose commented Apr 29, 2023

Set the error display to maximum in the Joomla backend configuration (server).
Then go to the front end of the website

@Chacapamac
Copy link
Collaborator

I’m on Template One
— Error Reporting was Maximum before
— I empty All caches and my Browser Cache and reload many times

No errors.

• Did you try to reinstall the Framework over, maybe a garbled file?
• Do you have any CSS, JS compression?

Do you have an example online?

@WM-Loose
Copy link
Author

WM-Loose commented May 1, 2023

we use the templates from joomlaplates.
no compression, an after reinstall the same problem.
i can put a test site online for a short time but we need to find a common time slot.
can you make a suggestion after european time?

@Chacapamac
Copy link
Collaborator

Anything before EU Time 8pm will work, I’m in Canada

8:01 p.m. Monday, in Brussels, Belgium is
2:01 p.m. Monday, in Ottawa, ON

I’m not a big coder guy, before you should lookup that “Warning: unpack(): Type n: not enough input, need 2, have 0” error in Google. I get many hit on this in the web
e.g. https://stackoverflow.com/questions/69968859/unpack-type-n-not-enough-input-need-2-have-0-dompdf

dompdf/php-font-lib#47
Seems to come from some fonts files, Try changing fonts, just to see????

@WM-Loose
Copy link
Author

WM-Loose commented May 1, 2023

OK, I'll take a look and get back to you in a few days.

@Chacapamac
Copy link
Collaborator

Maybe it can give direction to Lee to see what is the problem. I will take a look also!
Good Day!

@southpaw3229
Copy link

I am also having the same issue. Running Joomla 4.3.3 and php 7.4

[19-Jul-2023 01:23:22 UTC] PHP Warning: fread() expects parameter 1 to be resource, bool given in /home/woodland/public_html/libraries/astroid/framework/library/FontLib/BinaryStream.php on line 150
[19-Jul-2023 01:23:22 UTC] PHP Warning: unpack(): Type N: not enough input, need 4, have 0 in /home/woodland/public_html/libraries/astroid/framework/library/FontLib/BinaryStream.php on line 256

@sonvnn
Copy link
Member

sonvnn commented Oct 5, 2023

This issue fixed in Astroid 3

@sonvnn sonvnn linked a pull request Oct 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants