Skip to content

Commit

Permalink
20230328 Fix CI build breakage.
Browse files Browse the repository at this point in the history
         Related Issue(s) #152 #155 #155 #158 #159 #160 #162
  • Loading branch information
NathanGibbs3 committed Mar 28, 2023
1 parent 6719aba commit 9529126
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
1 change: 1 addition & 0 deletions includes/base_db.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ function NewBASEDBConnection($path, $type){
// On PHP 5.5+, use mysqli ADODB driver & gracefully deprecate
// the mysql, mysqlt & maxsql drivers.
if ( $version[0] > 5 || ( $version[0] == 5 && $version[1] > 4) ){
mysqli_report(MYSQLI_REPORT_OFF); // Issue #162 temp fix.
$Wtype = "mysqli";
}
}
Expand Down
2 changes: 1 addition & 1 deletion includes/base_log_error.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function returnErrorMessage ($message, $color = "#ff0000", $br = 0 ){
$color = "#ff0000";
}
$error = "<font color='$color'>$message</font>";
if ($br != 0){
if ( is_numeric($br) && $br == 1 ){ // Issue #160
$error .= '<br/>';
}
return $error;
Expand Down
13 changes: 9 additions & 4 deletions tests/composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,20 @@ if [ "$TRAVIS" != "true" ]; then
fi
fi

echo -n "PHP Composer install "
if [ "$Composer" = "1" ]; then
if [ "$TRAVIS" == "true" ]; then # Only install on travis
curl -s http://getcomposer.org/installer | $ph
echo "started."
$ph -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ph composer-setup.php --2
# curl -s http://getcomposer.org/installer | $ph
fi
px="$ph $pu.phar"
elif [ "$Composer" = "2" ]; then
echo "not necessary, using system."
px=$pu
else
echo "PHP Composer install not supported."
echo "not supported."
if [ "$TRAVIS" != "true" ]; then
Composer=0
fi
Expand All @@ -43,9 +48,9 @@ if [ "$Composer" \> "0" ]; then
puv=`$pu --version`
fi
puv=`echo $puv|sed -e "s/^Composer version //" -r -e "s/ [0-9]+.*$//"`
pvM=`echo $puv|sed -r -e "s/\.[0-9]\.[0-9]+$//"`
pvM=`echo $puv|sed -r -e "s/\.[0-9]+\.[0-9]+$//"`
#pvm=`echo $puv|sed -r -e "s/^[0-9]\.//" -e "s/\.[0-9]+$//"`
#pvr=`echo $puv|sed -r -e "s/^[0-9]\.[0-9]\.//"`
#pvr=`echo $puv|sed -r -e "s/^[0-9]+\.[0-9]+\.//"`
if [ "$TRAVIS" == "true" ]; then # Disable XDebug
mv ${HOME}/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ${HOME}/xdebug.ini
if [ "$pvM" == "1" ]; then # Issue #152 fix
Expand Down
26 changes: 14 additions & 12 deletions tests/setupenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ if [ "$pvM" == "5" ] && (
echo "Enabling Safe Mode."
phpenv config-add tests/phpcommon/safe_mode.ini
export SafeMode=1
if [ "$pvM" == "5" ] && [ "$pvm" == "3" ]; then
# Update CA Bundle on PHP 5.3x Issue #155
# Add Ubuntu Trusty repo.
sudo add-apt-repository -y deb http://us.archive.ubuntu.com/ubuntu/ trusty
sudo apt-get -q update
# sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-get install ca-certificates -y
sudo update-ca-certificates
fi
fi
else
SafeMode=0
Expand Down Expand Up @@ -149,6 +140,15 @@ if [ "$Composer" \< "1" ]; then # Can we install it?
if [ "$TRAVIS" == "true" ]; then
if [ "$Composer" \> "0" ]; then
export COMPOSER_MEMORY_LIMIT=2G
if [ "$pvM" == "5" ] && [ "$pvm" == "3" ]; then
# Update CA Bundle on PHP 5.3x Issue #155
# Add Ubuntu Trusty repo.
# sudo add-apt-repository -y deb http://us.archive.ubuntu.com/ubuntu/ trusty
# sudo apt-get -q update
# sudo apt-get install apt-transport-https ca-certificates -y
# sudo apt-get install ca-certificates -y
# sudo update-ca-certificates
fi
if [ "$SafeMode" == "1" ]; then # Safe mode.
# Install composer.
export Composer=1
Expand Down Expand Up @@ -185,12 +185,14 @@ ADODl=archive
ADOFilePfx=v
ADOFileSfx=.tar.gz
if [ "$pvM" \> "7" ]; then # PHP 8x
ADODBVer=5.20.12
ADODBVer=5.20.14
if [ "$1" == "" ] && [ "$TRAVIS" == "true" ]; then
ADODBPATH="ADOdb-$ADODBVer"
fi
elif [ "$pvM" \> "5" ]; then # PHP 7x
if [ "$pvm" \> "1" ]; then # PHP 7.2+
if [ "$pvm" \> "3" ]; then # PHP 7.3+
ADODBVer=5.20.13
elif [ "$pvm" \> "1" ]; then # PHP 7.2+
ADODBVer=5.20.12
else
ADODBVer=5.20.0
Expand All @@ -200,7 +202,7 @@ elif [ "$pvM" \> "5" ]; then # PHP 7x
fi
elif [ "$pvM" \> "4" ]; then # PHP 5x
if [ "$pvm" \> "2" ]; then # PHP 5.3+
ADODBVer=5.10
ADODBVer=5.11
else
ADODBVer=5.01beta
fi
Expand Down

0 comments on commit 9529126

Please sign in to comment.