Doctrine 1
  1. Doctrine 1
  2. DC-131

"Fatal error: [] operator not supported for strings" when use Apc Cache Driver with Doctrine 1.2.0 ALPHA 3

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-ALPHA3
    • Fix Version/s: 1.2.0-ALPHA3
    • Component/s: Caching
    • Labels:
      None
    • Environment:
      PHP 5.3 with APC 3.1.3p1 module, Apache 2.2.13, GNU/linux 2.6.27.7-smp - i686 Intel Pentium 4 CPU 3.20GHZ

      Description

      Fatal error: [] operator not supported for strings in /opt/httpd/lib/php/Doctrine/Cache/Driver.php on line 244

      The fetch function return a string, not a array

      I offer following modification :

      File: Doctrine/Cache/Apc.php

      public function fetch($id, $testCacheValidity = true)

      { $results = apc_fetch($this->_getKey($id)); //$results = (array) $results; // Drop this line //return $results[0]; // Drop this line return $results; // Add this line }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Olivier Sieffert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: