Skip to content

invalid use of PEAR::isError (and other) #1975

Closed

Description

@BrummbQ

In the internal database code, you're calling PEAR::isError exclusively statically. You've changed also the PEAR classes in 3rdparty to represent this fact and that sucks: You made yourself incompatible with upstream libraries. That leads to funny php errors like this, if try to replace i.e. 3rdparty/PEAR.php with the genuine version:

PHP Strict standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/owncloud/lib/MDB2/Driver/sqlite3.php on line 1209

3rdparty is called 3rdparty for an reason. You should not change the code arbitrary to your liking. For me, as a Fedora packager, this makes life very hard, if I try to unbundle the 3rdparty code.

Is there a special reason why you did this?

Activity

  1. BernhardPosselt commented on Feb 27, 2013

    @BernhardPosselt
    Contributor

    Great! :) I was wondering how this error appeared, I think it happened in the beginning when the oC people decided to use static for everything ;D

    cc @icewind1991

  2. BernhardPosselt commented on Feb 27, 2013

    @BernhardPosselt
    Contributor
  3. icewind1991 commented on Feb 27, 2013

    @icewind1991
    Contributor

    @BrummbQ I'm aware the situation with pear in 3rdparty is messed up, the reason those changes were made is because PEAR (and MDB2) itself are inconsistent with it's use of static functions.

    Inside the PEAR/MDB2 code isError get's called both statically and non statically, the changes to PEAR were made to solve the strict standard errors that upstream MDB2/PEAR were generating.

  4. BrummbQ commented on Feb 28, 2013

    @BrummbQ
    Author

    all right, in that case the new function signatures should be pushed upstream. Someone of you working in this? If not I would volunteer.

  5. BernhardPosselt commented on Mar 18, 2013

    @BernhardPosselt
    Contributor

    @BrummbQ im closing this because we will move to doctrine, unneeded work.

  6. locked as resolved and limited conversation to collaborators on Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions