Uploaded image for project: 'Chemistry'
  1. Chemistry
  2. CMIS-652

Method CMISService::getFolderParent() throws a fatal error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PHPCMIS 0.1, PHPCMIS 0.2
    • Fix Version/s: PHPCMIS 0.1, PHPCMIS 0.2
    • Component/s: cmis-phplib
    • Labels:
    • Environment:

      Ubuntu 12.10 x64, Apache Server 2.2.22, PHP 5.4

      Description

      On line 852 of cmis_repository_wrapper.php, there is an invocation to

      extractObjectEntry()

      , which is not implemented in the class, nor its parent, which is causing a fatal error in PHP.

      It should be changed to

      CMISRepositoryWrapper::extractObjectFeed($ret->body)

        Activity

        Hide
        richardm Richard McKnight added a comment - - edited

        Committed in revision 1502932
        ==============
        <pre class="code-java">
        function getFolderParent($folderId, $options = array ())

        { //yes $myURL = $this->getLink($folderId, LINK_UP); //TODO: Need GenURLQueryString Utility $ret = $this->doGet($myURL); $obj = CMISRepositoryWrapper::extractObject($ret->body); $this->cacheObjectInfo($obj); return $obj; }

        </pre>

        Show
        richardm Richard McKnight added a comment - - edited Committed in revision 1502932 ============== <pre class="code-java"> function getFolderParent($folderId, $options = array ()) { //yes $myURL = $this->getLink($folderId, LINK_UP); //TODO: Need GenURLQueryString Utility $ret = $this->doGet($myURL); $obj = CMISRepositoryWrapper::extractObject($ret->body); $this->cacheObjectInfo($obj); return $obj; } </pre>
        Hide
        danielperaza Daniel Peraza added a comment -

        Patch for cmis_repository_wrapper.php

        Show
        danielperaza Daniel Peraza added a comment - Patch for cmis_repository_wrapper.php
        Hide
        danielperaza Daniel Peraza added a comment -

        In line 847 of cmis_repository_wrapper.php, change the getFolderParent() method definition to the following:

        function getFolderParent($folderId, $options = array ())
        { //yes
          $myURL = $this->getLink($folderId, "up");
          //TODO: Need GenURLQueryString Utility
          $ret = $this->doGet($myURL);
          $obj = CMISRepositoryWrapper::extractObjectFeed($ret->body);
          $this->cacheObjectInfo($obj);
          return $obj;
        }
        
        Show
        danielperaza Daniel Peraza added a comment - In line 847 of cmis_repository_wrapper.php, change the getFolderParent() method definition to the following: function getFolderParent($folderId, $options = array ()) { //yes $myURL = $ this ->getLink($folderId, "up" ); //TODO: Need GenURLQueryString Utility $ret = $ this ->doGet($myURL); $obj = CMISRepositoryWrapper::extractObjectFeed($ret->body); $ this ->cacheObjectInfo($obj); return $obj; }

          People

          • Assignee:
            richardm Richard McKnight
            Reporter:
            danielperaza Daniel Peraza
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development