Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16449

Reconsider use of singletons / incompatibility with newer PEAR

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.6.2
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      Developer Doc

      Description

      Singletons seems to be deprecated these days, see [1].

      This issue came to my attention when I tried to run CiviCRM on Debian Jessie with newer version of PHP-PEAR installed to system which produced the following error:

      ~~~~
      Deprecated: Non-static method PEAR_ErrorStack::singleton() should not be called statically, assuming $this from incompatible context in /usr/share/civicrm/packages/PEAR/ErrorStack.php on line 983

      Fatal error: Cannot make non static method PEAR_ErrorStack::singleton() static in class CRM_Core_Error in /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php on line 73
      ~~~~

      I am illiterate in PHP so I may not have described the issue properly.

      [1]: https://stackoverflow.com/questions/3387459/when-to-use-a-singleton/3387530#3387530

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              onlyjob Dmitry Smirnov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: