Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.1

Bug #18499 hasStream method doesn't handle $this->_stream being null
Submitted: 2011-05-03 02:27 UTC
From: kguest Assigned: tstarling
Status: Duplicate Package: File_Ogg (version SVN)
PHP Version: 5.2.10 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2011-05-03 02:27 UTC] kguest (Ken Guest)
Description: ------------ This error happens when running test script below: Warning: Invalid argument supplied for foreach() in /usr/share/php/File/Ogg.php on line 555 Test script: --------------- require_once "File/Ogg.php"; $realpath = "/home/kguest/MusicLocal/Severed Fifth/Nightmares By Design/severedfifth_politicold.ogg"; echo "RP:", $realpath, "\n"; $ogg = new File_Ogg($realpath); // Check for a vorbis logical stream. if (! $ogg->hasStream(OGG_STREAM_VORBIS)) { die("No logical vorbus stream present") ; } exit; Expected result: ---------------- script to run without errors Actual result: -------------- php oggtest.php RP:/home/kguest/MusicLocal/Severed Fifth/Nightmares By Design/severedfifth_politicold.ogg Warning: Invalid argument supplied for foreach() in /usr/share/php/File/Ogg.php on line 555 Call Stack: 0.0003 74736 1. {main}() /home/kguest/oggtest.php:0 0.6564 794012 2. File_Ogg->hasStream() /home/kguest/oggtest.php:23 No logical vorbus stream present

Comments

 [2011-05-03 02:30 UTC] kguest (Ken Guest)
 [2011-05-03 09:31 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: tstarling
 [2011-05-03 09:32 UTC] doconnor (Daniel O'Connor)
Actually; this is a dupe of Bug #16271 - which has been open a year. QA time!
 [2011-05-03 09:33 UTC] doconnor (Daniel O'Connor)
-Status: Analyzed +Status: Duplicate