php-fit-file-analysis icon indicating copy to clipboard operation
php-fit-file-analysis copied to clipboard

Notice: Undefined offset: 84 in phpFITFileAnalysis.php on line 1228

Open LudoWeb opened this issue 5 years ago • 4 comments

Hi,

I have an issue with the parser.

( ! ) Notice: Undefined offset: 84 in \vendor\php-fit-file-analysis\phpFITFileAnalysis.php on line 1228

Do you have any idea about this issue ? Many thanks

LudoWeb avatar Jun 19 '19 15:06 LudoWeb

Can you confirm the offending line 1228 is: $this->types = $this->endianness[$architecture];

It would seem that $architecture has a value of 84, which won't work as it should only be 0 or 1 depending on whether little or big-endianness should be observed.

What device was the FIT file created with? E.g. a Garmin Forerunner XX or whatever.

Do you only have the issue with one FIT file or many?

I can have a deeper look if you share a FIT file with the issue.

adriangibbons avatar Jun 20 '19 03:06 adriangibbons

It's a Suunto device. I have the issue with one FIT only.

See the file in attachment.

Many thanks :)

LudoWeb avatar Jun 20 '19 07:06 LudoWeb

Hey @adriangibbons,

Were you be able to check the issue ?

Edit : the device was "Forerunner 735XT" with "Ceinture Cardio Garmin HRM Swim" and none a suunto device.

LudoWeb avatar Jun 25 '19 08:06 LudoWeb

Hi @LudoWeb I have looked into this issue for the past 3 hours and not got very far.

I don't understand why the architecture is coming up as something other than 0 or 1.

Only thing I can think of is that this Forerunner combined with the HRM belt is using compressed HR fields, which I don't think the class currently supports. I read the FIT documentation and unfortunately, it is not obvious to me how to implement this (assuming that it is the issue in the first place)!

adriangibbons avatar Jun 26 '19 06:06 adriangibbons