Jump to content

PHP Size Of Error

I am Using A Script that I pulled from Github Here for a school project and Have Zero Clue what is causing the Size Of Error that I get when I run the code. I have have pretty much recreated His Example code and it I am running on PHP 7.4.2 Which should present no issues. I have looked at the code and have No Clue Where the Error Comes from and when I look at the code and underlying math I have Zero Clue how it works becasue of the fact that I see there is no value being set for Points but they end up pulling the value from count of and Parsing it into an array. Now I could run the Program and just turn off error reporting but that has put me in a bad situation where I slam my PC with 20,000+ Errors on a single page which is the back end of my Server. The Specific Error that I get is 

Warning: sozeof(): Parameter must be an array or an object that implements Countable in SERVERDIR\stlcalc.php on line 147. 

This happens in the Read Triangle Function Which is very important to the program overall as counting the triangles is Key to Slicing the STL file and getting overall Statistics, if there is another peice of code that can do this and it currently functions Please send it my way. Thanks for any help in Advance

Link to comment
Share on other sites

Link to post
Share on other sites

You're getting that wraning because $this->points is never initialised. Looking at the code I'm not sure what $points is supposed to be, but if the code otherwise works then you can fix it by initialising it to array() on line 17, which will give the same behaviour but fix the warning. Do make sure the code does actually work though, because it does look like it was at least meant to do something at some point.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×