Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1481

Can't overload MongoCollection.findOne()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Gone away
    • Affects Version/s: 1.4.4, 1.6.0, 1.6.1, 1.6.2, 1.6.3
    • Fix Version/s: None
    • Component/s: pecl-mongo
    • Labels:
      None
    • Environment:
      OS : Gentoo Linux
      PHP : 5.5.28
    • # Replies:
      1
    • Last comment by Customer:
      false

      Description

      I have a class 'overload_mongoCollection.php' that extends MongoCollection.
      In this class, I overload most functions (aggregate, batchInsert ...).

      But when I want to overload the 'findOne' function, my website is broken and I have a blank page.
      The only error message that appears in the log files is :
      [error] [client 127.0.0.1] PHP Fatal error: Class 'overload_mongoCollection' not found in /path/to/init_mongoDB.php on line 586

      The code behind the error is:
      public function findOne(array $query=array(),array $fields=array(),array $options=array())

      { throw new Exception('findOne is disabled'); }

      I tested several versions of pecl-mongo (1.4.4, 1.6.0, 1.6.1, 1.6.2, 1.6.3) and the bug is still present.

      Is there a problem in my code or is it really a bug?

      Thanking you in advance.

        Attachments

          Activity

            People

            Assignee:
            jmikola Jeremy Mikola
            Reporter:
            brsysadmin Bertrand
            Participants:
            Last commenter:
            Rathi Gnanasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              4 years, 50 weeks ago
              Date of 1st Reply: