php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63796 Constant ID3_V2 does not exist for id3-0.2 package
Submitted: 2012-12-18 09:42 UTC Modified: 2015-07-26 18:14 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: reptilien dot 19831209be1 at gmail dot com Assigned:
Status: Suspended Package: id3 (PECL)
PHP Version: 5.3.19 OS:
Private report: No CVE-ID: None
 [2012-12-18 09:42 UTC] reptilien dot 19831209be1 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.id3-get-version#refsect1-
function.id3-get-version-returnvalues
---

Pay attention to the package version between 1.0 and 2.0. More constants for 
version 2 of id3 tags are available.

Test script:
---------------
<?php
$version = id3_get_version( "path/to/example.mp3" );
if ($version & ID3_V2) {
    // something here
}
?>
With the package id3-0.2 an error is returned as:
PHP Notice:  Use of undefined constant ID3_V2 - assumed 'ID3_V2'.

See constants defined with get_defined_constants() as:
<?php
$id3_constants=get_defined_constants(true);
print_r($id3_constants["id3"]);
?>
You have constants ID3_V2_1, ID3_V2_2 , etc


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-26 18:14 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2015-07-26 18:14 UTC] cmb@php.net
The id3 extension is unmaintained (no release for more
than 10 years). I'm suspending this report until a new maintainer
is found.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC