Announcement

#1 2012-12-08 05:05:33

Puppet
Member
2012-11-28
15

piwigo-videojs invalid argument foreach()

Hi I have piwigo-videojs installed and it plays the videos and I have thumbnails working but everytime I click on a single video from the gallery it displays two warnings at the top of the screen.

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\photos\plugins\piwigo-videojs\include\getid3\module.audio-video.quicktime.php on line 204

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\photos\plugins\piwigo-videojs\include\getid3\module.audio-video.quicktime.php on line 212

So I opened the file and here are lines 202-222

// some "ilst" atoms contain data atoms that have a numeric name, and the data is far more accessible if the returned array is compacted
                $allnumericnames = true;
                foreach ($atom_structure['subatoms'] as $subatomarray) {
                    if (!is_integer($subatomarray['name']) || (count($subatomarray['subatoms']) != 1)) {
                        $allnumericnames = false;
                        break;
                    }
                }
                if ($allnumericnames) {
                    $newData = array();
                    foreach ($atom_structure['subatoms'] as $subatomarray) {
                        foreach ($subatomarray['subatoms'] as $newData_subatomarray) {
                            unset($newData_subatomarray['hierarchy'], $newData_subatomarray['name']);
                            $newData[$subatomarray['name']] = $newData_subatomarray;
                            break;
                        }
                    }
                    $atom_structure['data'] = $newData;
                    unset($atom_structure['subatoms']);
                }
                break;

I'm not a programmer. Is there anything in these lines I can fix to make the warning messages go away?

Offline

 

#2 2013-06-01 03:19:22

xbgmsharp
Member
1970-01-01
215

Re: piwigo-videojs invalid argument foreach()

Hello,

I am the author.
Do you still have this issue with the latest release (eg. 0.5)?

Offline

 

#3 2013-11-10 14:49:54

Alper
Guest

Re: piwigo-videojs invalid argument foreach()

Hi,

i have the same issue since i have installed the videojs on both (old/new) versions.
Same issue on IMAC + MS-WIN7
The error messages on the last version:

Warning: Invalid argument supplied for foreach() in /www/htdocs/v036559/Piwigo/Gallery/plugins/piwigo-videojs/include/getid3/module.audio-video.quicktime.php on line 204

Warning: Invalid argument supplied for foreach() in /www/htdocs/v036559/Piwigo/Gallery/plugins/piwigo-videojs/include/getid3/module.audio-video.quicktime.php on line 212

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v036559/Piwigo/Gallery/plugins/piwigo-videojs/include/getid3/module.audio-video.quicktime.php:204) in /www/htdocs/v036559/Piwigo/Gallery/include/page_header.php on line 101

Would really appretiate your help
Best regards
Alper G.

 

#4 2013-11-10 15:24:34

xbgmsharp
Member
1970-01-01
215

Re: piwigo-videojs invalid argument foreach()

Hello,

You confirm you get this error using version 1.0.3 release today?
Not sure it is an issue with GetID3 or in the MP4 file.
Would it possible to provide me the video file so I can test.

If impossible, please reply to the following questions.
Does this happens for all videos?
Could you check and report the difference between both video using HandBrake (http://handbrake.fr/)
Open the video via photo_edit in Piwigo, do you get any error? do you see all the metadata?

Anyway in a long term I plan to remove the getid3 dependency.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact