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

PHP Notice: Undefined property: stdClass::$searchenginequeryonly

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE
    • Hide
      1. Ensure that you have, debugging set to developer level and debugging display enabled. Can be done by setting, in the config.php file, these:

        $CFG->debug = E_ALL | E_STRICT;
        $CFG->debugdisplay = true;
        

      2. Init phpunit (php admin/tool/phpunit/cli/init.php)
      3. Verify that there is NOT any "PHP Notice" (like the one in the description of the issue) after the "-->System" line of the output.
      4. Init behat (php admin/tool/behat/cli/init.php)
      5. Verify that there is NOT any "PHP Notice" (like the one in the description of the issue) after the "-->System" line of the output.
      6. Install moodle, via CLI or via Web (one of them is enough)
        1. If using CLI verify that there is NOT any "PHP Notice" (like the one in the description of the issue) after the "-->System" line of the output.
        2. If using Web verify that there is NOT any "PHP Notice" (like the one in the description of the issue) in the web server error logs (when the tables are being created, there can be other notices in other install pages).
      Show
      Ensure that you have, debugging set to developer level and debugging display enabled. Can be done by setting, in the config.php file, these: $CFG->debug = E_ALL | E_STRICT; $CFG->debugdisplay = true; Init phpunit ( php admin/tool/phpunit/cli/init.php ) Verify that there is NOT any "PHP Notice" (like the one in the description of the issue) after the "-->System" line of the output. Init behat ( php admin/tool/behat/cli/init.php ) Verify that there is NOT any "PHP Notice" (like the one in the description of the issue) after the "-->System" line of the output. Install moodle, via CLI or via Web (one of them is enough) If using CLI verify that there is NOT any "PHP Notice" (like the one in the description of the issue) after the "-->System" line of the output. If using Web verify that there is NOT any "PHP Notice" (like the one in the description of the issue) in the web server error logs (when the tables are being created, there can be other notices in other install pages).

      This is a regression of MDL-68729, where a PHP Notice is happening on install / phpunit & behat init:

      PHP Notice:  Undefined property: stdClass::$searchenginequeryonly in /Users/stronk7/git_moodle/moodle/admin/settings/plugins.php on line 558
       
      Notice: Undefined property: stdClass::$searchenginequeryonly in /Users/stronk7/git_moodle/moodle/admin/settings/plugins.php on line 558
      

      It's specially harmful because I detected it when local_codechecker scheduled integration suddenly stopped working:

      ...
       7/9 [=====================>------]  77% 41 secs [Initialize test suite]
      287                                                                               
      288  [MoodlePluginCI\Process\MoodlePhpException]                                  
      289  PHP error message was detected when running this command:                    
      290    php -d log_errors=1 -d error_log=NULL /home/travis/build/moodle/admin/too  
      291  l/behat/cli/util_single_run.php --install                                    
      292  Moodle scripts should run without any PHP errors.                            
      293  Error Output                                                                 
      294  ============                                                                 
      295  PHP Notice:  Undefined property: stdClass::$searchenginequeryonly in /home/  
      296  travis/build/moodle/admin/settings/plugins.php on line 558
      ...
      

      it seems that we'll need to protect that with the usual empty() checks... on it...

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Carlos Escobedo Carlos Escobedo
            Victor Déniz Falcón Victor Déniz Falcón
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 15 minutes
                4h 15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.