Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through PHP notices, warnings, and errors to test harness and fix resulting failures #4074

Merged
merged 56 commits into from
Jan 19, 2020

Commits on Jan 17, 2020

  1. Turn off web error handler for CLI (breaks a lot of stuff!)

    error_handler now only runs set_error_handler in web mode.
    
    E_ALL notices, warnings, and errors are now reported, which causes
    the test harness to fail.
    Deltik committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    b9d4961 View commit details
    Browse the repository at this point in the history
  2. Null coalescing for $_SERVER keys in e107_class.php

    Removes CLI-invoked E_NOTICE in:
    * e107::prepare_request()
    * e107::set_constants()
    * e107::set_urls()
    Deltik committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    be36462 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c232613 View commit details
    Browse the repository at this point in the history
  4. Null coalescing for $_SERVER keys in iphandler_class.php

    Resolves CLI-invoked E_NOTICE in:
    * eIPHandler::__construct()
    * eIPHandler::getCurrentIP()
    
    Also resolves possible blank eIPHandler::$serverIP
    Deltik committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    bcba1e0 View commit details
    Browse the repository at this point in the history
  5. Stop stepping on E107_DBG_* constants in tests

    \Helper\Unit::_beforeSuite() now sets E107_DEBUG_LEVEL so that
    debug_handler.php sets the debug mode.
    
    Also fixed E_NOTICE if E107_DEBUG_LEVEL is set beforehand
    Deltik committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    a49b532 View commit details
    Browse the repository at this point in the history
  6. Null coalescing for $_SERVER keys in online_class.php

    Resolves CLI-invoked E_NOTICE in:
    * e_online::goOnline()
    Deltik committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    6fe4bf1 View commit details
    Browse the repository at this point in the history
  7. Null coalescing for $_SERVER keys in session_handler.php

    Resolves CLI-invoked E_NOTICE in:
    * e_session::getValidateData()
    * e_core_session::challenge()
    Deltik committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    4321c1b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ef34ef7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bfad3f7 View commit details
    Browse the repository at this point in the history
  10. Fixed E_NOTICE in plugin install/uninstall process

    - FIX: e107::coreLan() now loads the lan_admin.php file if the $admin argument is true
    - FIX: Variable scope of $eplug_folder in e107plugin::uninstall()
    - FIX: isset() check order in pluginsTest::makePluginReport()
    - FIX: class2.php: Missing ADMINPERMS constant in CLI mode
    Deltik committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    62a547a View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b4e48f8 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2020

  1. Configuration menu
    Copy the full SHA
    78a5c2a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    66a9765 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8e0b047 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c604b30 View commit details
    Browse the repository at this point in the history
  5. Null checks for e107TinyMceParserTest

    - FIX: Do not redefine e_ADMIN_AREA in parser.php
    - FIX: Null checks for e107TinyMceParser
    - FIX: Array type check for e_bbcode::imgToBBcode()
    - FIX: Optional query string in e_parse::thumbUrlDecode()
    - FIX: Don't redefine TINYMCE_UNIT_TEST
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    b2bd676 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    98911f0 View commit details
    Browse the repository at this point in the history
  7. Removed unused variable from e107plugin::XmlAdminLinks()

    Was causing an undefined index error
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    1561992 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    82499f7 View commit details
    Browse the repository at this point in the history
  9. Updated pclzip.lib.php to v2.8.4 to fix math error

    Also suppress mkdir() error in e_file::unzipGithubArchive()
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    24fe5c8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ce51015 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1d72d48 View commit details
    Browse the repository at this point in the history
  12. Fix e_arrayTest::testUnserialize()

    e_DEBUG is already set because of the new test debug strategy
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    dbdb5f4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    509b9ff View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d2d0105 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    15de2e2 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    46b5418 View commit details
    Browse the repository at this point in the history
  17. Type checks involving e_formTest

    - MOD: e107::getTemplate() now accepts blank strings for the plugin name to mean
           that a core template should be loaded
    - FIX: e_form::progressBar() now supports input values that already have % at the end
    - FIX: Null check for $options['list'] in e_form::progressBar()
    - NEW: Test rounding in e_formTest::testProgressBar()
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    622be85 View commit details
    Browse the repository at this point in the history
  18. Fix undefined constant by importing LAN in e_marketplace

    Apparently e_marketplace depends on the admin area theme LAN
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    fc6b81f View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    b8d6b9e View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    a0f4489 View commit details
    Browse the repository at this point in the history
  21. Test isolation fixes for e_db_abstractTest

    Also needed a null check in e_db_pdo::db_Query()
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    91660a2 View commit details
    Browse the repository at this point in the history
  22. Eliminated notice failures in e107Test

    - FIX: e107::getTemplate() could be run without the necessary plugin LANs
    - FIX: e107Test::testGetInstance() included e107_config.php too many times
    - FIX: Empty check in e107Test::testGetTemplate()
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    f5f1454 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    cf8dc0b View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    f56bf44 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    d6eafdc View commit details
    Browse the repository at this point in the history
  26. Strict fixes for e_tree_model::flattenTree()

    - FIX: Null check during child recursion of e_tree_model::flattenTree()
    - FIX: TreeModelTest::testTreeParentsAreAssignedCorrectly() apparently never worked until now because the wrong index was used
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    a1560b1 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    9506f98 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    76c0f7e View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    638412a View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    207ce81 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    d1bdfb8 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    d55fe8a View commit details
    Browse the repository at this point in the history
  33. Fixed a bunch of PHP 7.4 syntax errors

    - FIX: Removed pointless (and invalid) destructor in LinkedIn::__destruct()
    - FIX: All files that trigger this deprecation notice in PHP 7.4:
           "Array and string offset access syntax with curly braces is deprecated"
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    524229b View commit details
    Browse the repository at this point in the history
  34. Fix PHP 7.3 deprecation warning in lan_ren_help.php

    Apparently a bug introduced on 2004-09-21:
    https://sourceforge.net/p/e107/svn/898/tree/trunk/e107_0.7/e107_languages/English/lan_ren_help.php
    
    Just happens to be a misuse of the third parameter of define()
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    4454b01 View commit details
    Browse the repository at this point in the history
  35. Fixed PHP 7.3 warnings

    - FIX: Silenced compact() in e107Test::testInitCore()
    - FIX: Null check in e_db_pdo::makeTableDef()
    - FIX: Null check in e_db_mysql::makeTableDef()
    - FIX: userlogin::login() had this warning on line 148:
           "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    be8f2bb View commit details
    Browse the repository at this point in the history
  36. Silence debug prints clearly not meant for CLI

    - FIX: e_array::unserialize() HTML vomit in CLI mode
    - FIX: e107_debug_shutdown() HTML vomit because $error_handler was not global
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    52116ad View commit details
    Browse the repository at this point in the history
  37. Fix flaky e_pluginTest::testBuildAddonPrefList()

    Apparently requires the "gallery" plugin to be installed
    Deltik committed Jan 18, 2020
    Configuration menu
    Copy the full SHA
    510d8e2 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    970f65b View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2020

  1. PHP 5.6 fixes for e_db_mysql

    - FIX: Don't redefine MYSQL_* constants in e_db_pdo_class.php
    - FIX: e_db_mysql::rowCount() could try to use mysql_num_rows() to count rows of a non-resource
    - FIX: e_db_mysql::delete() stores the number of deleted rows in e_db_mysql::$mySQLrows
    - FIX: e_db_abstractTest::testDb_Query() was fetching in PDO mode but shouldn't have been
    - FIX: Typos in e_db_abstractTest::testDelete()
    - MOD: Moved PDO-exclusive testBackup() from e_db_abstractTest to e_db_pdoTest
    - FIX: e_db_mysqlTest now works in PHP 5.6 if the main e_db instance was in PDO mode but the test
           class initializes in legacy mode
    - MOD: e_db_mysqlTest now asserts that PDO mode is not in use
    - FIX: e_db_mysqlTest::testGetServerInfo() should now actually get a version number
    - FIX: e_db_mysqlTest::testGetLastErrorNumber() has a different error code compared to PDO
    - FIX: e_db_mysqlTest::testEscape() should actually get something from mysql_real_escape_string()
    Deltik committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    72d3f07 View commit details
    Browse the repository at this point in the history
  2. Removed PDO from e_db_mysql

    e_db_mysql has divorced e_db_pdo. They are now independently functioning implementations of e_db.
    Deltik committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    c789767 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4a26ac5 View commit details
    Browse the repository at this point in the history
  4. e_db_mysql: Replaced mysql with mysqli

    Finally no longer using the mysql_* functions removed in PHP 7.0
    Deltik committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    8c528de View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1fd0a17 View commit details
    Browse the repository at this point in the history
  6. Don't spam database server with connections

    - MOD: Silently ignore failures to e_db_mysql::close(); if it's failing, it's probably already closed
    - FIX: Close the PDO or mysqli connection after each e_db_abstractTest test
    - MOD: Changed class2.php's $sql variable to be hinted as an e_db instead of e_db_mysql
    Deltik committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    8b354ad View commit details
    Browse the repository at this point in the history
  7. Workaround for old phpunit/php-code-coverage missing mkdir()

    codecept_output_dir() might not exist when the PHP-serialized coverage
    report is being generated. phpunit/php-code-coverage >= 6.0.8 fix this
    by creating that directory before writing the coverage report.
    
    PHP 5.6 can only get phpunit/php-code-coverage up to version 4.0.8,
    which does not have this fix. A workaround has been introduced in this
    commit to allow PHP-serialized coverage reports to be stored with PHP
    5.6.
    Deltik committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    f2a7590 View commit details
    Browse the repository at this point in the history