In RESTServer.inc, we pull the final URL parameter and put it into the variable $leaf, check it for a response format, and put it back with the following code

    // Return the leaf to the path array if it's not the resource name
    if (isset($leaf)) {
      if (!$resource_name) {
        $resource_name = $leaf;
      }
      else {
        array_push($path, $leaf);
      }
    }

if $leaf is '0', then this code fails because $leaf is evaluated as FALSE. A better check is to use isset(). Patch coming.

CommentFileSizeAuthor
#1 1051088.patch831 bytesgdd

Comments

gdd’s picture

Status: Active » Closed (fixed)
StatusFileSize
new831 bytes

I just committed the attached patch, it is documented here for posterity.