Skip to content

Commit

Permalink
Fix deprecated warning with PHP 5.6
Browse files Browse the repository at this point in the history
When running PHPUnit, we get a lot of PHP Deprecated warnings like this:

Automatically populating $HTTP_RAW_POST_DATA is deprecated [...]

This fixes the issue by setting always_populate_raw_post_data=-1 in
php.ini as recommended.
  • Loading branch information
dregad committed Feb 3, 2015
1 parent 53cad91 commit 2eb02b0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/travis_before_script.sh
Expand Up @@ -37,6 +37,22 @@ function step () {
echo
}

# -----------------------------------------------------------------------------
# Fix deprecated warning in PHP 5.6 builds:
# "Automatically populating $HTTP_RAW_POST_DATA is deprecated [...]"
# https://www.bram.us/2014/10/26/php-5-6-automatically-populating-http_raw_post_data-is-deprecated-and-will-be-removed-in-a-future-version/
# https://bugs.php.net/bug.php?id=66763

if [[ $TRAVIS_PHP_VERSION = '5.6' ]]
then
# Generate custom php.ini settings
cat <<-EOF >mantis_config.ini
always_populate_raw_post_data=-1
EOF
phpenv config-add mantis_config.ini
fi


# -----------------------------------------------------------------------------
step "Create database $MANTIS_DB_NAME"

Expand Down

0 comments on commit 2eb02b0

Please sign in to comment.