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

Bug #5537 Use of undefined constant DIME_OTPS_LEN
Submitted: 2005-09-27 14:49 UTC
From: jcuenca at infocasa dot com Assigned: yunosh
Status: Closed Package: Net_DIME
PHP Version: 5.0.5 OS: windows 2000
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 41 + 40 = ?

 [2005-09-27 14:49 UTC] jcuenca at infocasa dot com
Description: ------------ Use of undefined constant DIME_OTPS_LEN - assumed 'DIME_OTPS_LEN Test script: --------------- $test=' a dime message '; $f = fopen('tmp/dime2.jpg','wb+'); $debug = FALSE; $data = NULL; $dime = new Net_DIME_Message($f,50000,$debug); $test = $dime->decodeData($test); fclose($f); Expected result: ---------------- an image in the file /tmp/dime2.jpg Actual result: -------------- nothing


 [2006-04-18 18:09 UTC] aarondoom at cookiedoom dot com (Aaron Nixon)
An easy fix. --- ../Test/includes/Net/DIME.php 2006-04-18 11:01:28.000000000 -0700 +++ includes/Net/DIME.php 2005-05-24 15:05:46.000000000 -0700 @@ -290,7 +290,7 @@ class Net_DIME_Record extends PEAR if (!$this->_haveOpts) { $have = strlen($this->Elements[NET_DIME_OPTS]); $this->Elements[NET_DIME_OPTS] .= substr($data,$p,$this->Elements[NET_DIME_OPTS_LEN]-$have); - $this->_haveOpts = (strlen($this->Elements[NET_DIME_OPTS]) == $this->Elements[NET_DIME_OPTS_LEN]); + $this->_haveOpts = (strlen($this->Elements[NET_DIME_OPTS]) == $this->Elements[DIME_OTPS_LEN]); if (!$this->_haveOpts) return NULL; $p += $this->OPTS_LENGTH-$have; }
 [2007-01-22 15:51 UTC] yunosh (Jan Schneider)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.