Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-35689

The E_STRICT error level introduced in debug developper mode in MDL-31167 breaks the phpCAS library

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Authentication
    • Labels:
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      The enforcing of Php E_STRICT error level in debug developper mode (MDL-31167) is indeed a nice feature to track bad practices in Moodle code, however it does break third parties codes included in Moodle such as the phpCAS library used for CAS authentication.

      As reported by Eloy in MDL-12730, this third party library breaks in full debug mode (CFG->debug=32767) with the following errors

      -------------------------------------------------------------------------
      Strict Standards: Non-static method phpCAS::client() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/auth.php on line 172 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 405 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 423 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 583 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::traceEnd() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 697 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 644 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 647 Strict Standards: Non-static method phpCAS::traceEnd() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 434 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 644 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 647 Strict Standards: Non-static method phpCAS::setNoCasServerValidation() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/auth.php on line 180 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 1437 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::traceEnd() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 1442 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 644 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 647 Strict Standards: Non-static method phpCAS::checkAuthentication() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/auth.php on line 106 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 920 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 913 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 970 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1066 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::trace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1110 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 606 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 607 Strict Standards: Non-static method phpCAS::traceEnd() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1114 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 644 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 647 Strict Standards: Non-static method phpCAS::trace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1027 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 606 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 607 Strict Standards: Non-static method phpCAS::traceEnd() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1040 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 644 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 647 Strict Standards: Non-static method phpCAS::trace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 950 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 606 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 607 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1126 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 355 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::traceBegin() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 2641 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 616 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 631 Strict Standards: Non-static method phpCAS::trace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 2685 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 606 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 607 Strict Standards: Non-static method phpCAS::traceEnd() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 2688 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 644 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 647 Strict Standards: Non-static method phpCAS::traceEnd() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 370 Strict Standards: Non-static method phpCAS::backtrace() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 644 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 647 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/moodle.git/auth/cas/CAS/CAS.php:647) in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1128 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1129 Strict Standards: Non-static method phpCAS::getVersion() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 84
      CAS Authentication wanted!

      You should already have been redirected to the CAS server. Click here to continue.

      Strict Standards: Non-static method phpCAS::getVersion() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 84
      phpCAS 1.1.3 using server https://login.insa-lyon.fr/cas/ (CAS 2.0)
      Strict Standards: Non-static method phpCAS::traceExit() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS/client.php on line 1136 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 656 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 658 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 658 Strict Standards: Non-static method phpCAS::log() should not be called statically, assuming $this from incompatible context in /var/www/html/moodle.git/auth/cas/CAS/CAS.php on line 658
      ------------------------------------------------------------------

      This is well known to the primary developers https://issues.jasig.org/browse/PHPCAS-46 and they do not intent to fix it in near future... they just advice to turn off E_STRICT !!!

      I have fixed it in my place by adding the attached piece of code (that turns off E_SCRIPT if present ONLY for pages using CAS authentication ) at the top of auth/cas/CAS/CAS.php file

      Therefore I still can enjoy strict warnings in my own plugins

      Cheers

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              ppollet Patrick Pollet
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: