php coding error in OpenNab 0.6

homer-nm
2007-03-03
2013-04-29
  • homer-nm
    homer-nm
    2007-03-03

        function Request($host,$uri,$type='GET')
        {
            $this->host = $host;
            $this->uri = $uri;
            $this->type = $type;
           
            $this->bcversion = $_REQUEST['v'];

    Gives 29 errors like the following:

    Exception: TestOfPing -> testPackUnpack -> Unexpected PHP error [Undefined index: v] severity [E_NOTICE] in [/Library/WebServer/Documents/vl/includes/request.php line 35]
    Exception: TestOfPing -> testEmptyBlock -> Unexpected PHP error [Undefined index: v] severity [E_NOTICE] in [/Library/WebServer/Documents/vl/includes/request.php line 35]
    Exception: TestOfPing -> testCreateFromScratch -> Unexpected PHP error [Undefined index: v] severity [E_NOTICE] in [/Library/WebServer/Documents/vl/includes/request.php line 35]

    What do I need to do to correct the code?

     
    • I've put a bugfix into the "Feature Tracker" - if you update your code accordingly, it'll fix it - however, they are just warnings - the more recent versions of PHP don't like getting array data that doesn't exist - as a result the value 'v' is not sent as an HTTP_REQUEST (such as a POST variable), so as a result, it throws an error.

      The bugfix I submitted resolved the issue on my system.

      Regards,

      Jon