diff --git a/.github/workflows/test-acceptance.yml b/.github/workflows/test-acceptance.yml index 3cecf345e..8e4e3afe5 100644 --- a/.github/workflows/test-acceptance.yml +++ b/.github/workflows/test-acceptance.yml @@ -10,8 +10,7 @@ jobs: fail-fast: false matrix: operating_system: - - image: docker.io/jrei/systemd-ubuntu:20.04 - - image: docker.io/jrei/systemd-ubuntu:22.04 + - image: docker.io/jrei/systemd-ubuntu:22.04 # Uses PHP 8.1 by default runs-on: ubuntu-latest steps: @@ -48,6 +47,16 @@ jobs: " working-directory: ./e107_tests/lib/ci/salt/ + - name: Install PHP extensions + run: | + docker exec target apt-get update + docker exec target apt-get install -y php8.1-zip php8.1-curl php8.1-mbstring php8.1-xml + # Install extensions for PHP 8.1 (default in Ubuntu 22.04) + + - name: Verify PHP version + run: docker exec target php -v + # Confirms PHP 8.1 is in use + - name: Install test dependencies run: | docker exec -w /app/e107_tests/ -e COMPOSER_ALLOW_SUPERUSER=1 target \ diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 9b9bfc543..fc7274317 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -16,10 +16,10 @@ jobs: fail-fast: false matrix: interpreter: - - image: php:7.4 - image: php:8.1 - image: php:8.2 - image: php:8.3 + - image: php:8.4 db: - image: mysql:5.5 - image: bitnami/mysql:8.0 @@ -113,13 +113,13 @@ jobs: - name: Install Composer run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer + - name: Opt out of CVE-2022-24765 mitigation + run: git config --global safe.directory '*' + - name: Install test dependencies run: composer update --prefer-dist --no-progress working-directory: ./e107_tests/ - - name: Opt out of CVE-2022-24765 mitigation - run: git config --global safe.directory '*' - - name: Download Git submodule dependencies run: git submodule update --init --recursive --remote diff --git a/class2.php b/class2.php index 98c0458cb..aa951f605 100755 --- a/class2.php +++ b/class2.php @@ -1981,8 +1981,15 @@ class error_handler function __construct() { - $this->label = array(E_NOTICE => "Notice", E_WARNING => "Warning", E_DEPRECATED => "Deprecated", E_STRICT => "Strict"); - $this->color = array(E_NOTICE=> 'info', E_WARNING=>'warning', E_DEPRECATED => 'danger', E_STRICT => 'primary'); + $this->label = array(E_NOTICE => "Notice", E_WARNING => "Warning", E_DEPRECATED => "Deprecated"); + $this->color = array(E_NOTICE=> 'info', E_WARNING=>'warning', E_DEPRECATED => 'danger'); + + if (version_compare(PHP_VERSION, '8.4', '<')) + { + $this->label[E_STRICT] = "Strict"; + $this->color[E_STRICT] = 'primary'; + } + $this->docroot = e_ROOT; // dirname(realpath(__FILE__)).DIRECTORY_SEPARATOR; // This is initialized before the current debug level is known @@ -2003,7 +2010,7 @@ class error_handler if(!empty($_E107['cli'])) { - error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE); + error_reporting(E_ALL & ~E_NOTICE); return; } diff --git a/e107_admin/docs.php b/e107_admin/docs.php index f2270e6f6..3db2ba299 100644 --- a/e107_admin/docs.php +++ b/e107_admin/docs.php @@ -11,7 +11,7 @@ * */ require_once(__DIR__ . '/../class2.php'); -if(!ADMIN) +if(!deftrue('ADMIN')) { e107::redirect(); exit; @@ -129,7 +129,7 @@ class docs_ui extends e_admin_ui $text .= "