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

Updates for PHP 7.2 #336

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions docker_web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ USER root
# install php7 when canopy core is ready
RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN yum -y install php70w php70w-fpm php70w-common php70w-mysql php70w-pgsql php70w-devel php70w-pear php70w-gd php70w-pecl-memcache php70w-pspell php70w-snmp php70w-xmlrpc php70w-xml php70w-soap;
#RUN yum -y install php70w php70w-fpm php70w-common php70w-mysql php70w-pgsql php70w-devel php70w-pear php70w-gd php70w-pecl-memcache php70w-pspell php70w-snmp php70w-xmlrpc php70w-xml php70w-soap;
#RUN yum -y install php71w php71w-fpm php71w-common php71w-mysql php71w-pgsql php71w-devel php71w-pear php71w-gd php71w-pecl-memcache php71w-pspell php71w-snmp php71w-xmlrpc php71w-xml php71w-soap;
RUN yum -y install php71w php72w-fpm php72w-common php72w-mysql php72w-pgsql php72w-devel php72w-pear php72w-gd php72w-pecl-memcache php72w-pspell php72w-snmp php72w-xmlrpc php72w-xml php72w-soap php72w-mbstring;
#RUN yum -y install php php-common php-mysql php-pgsql php-devel php-gd php-pecl-memcache php-pspell php-snmp php-xmlrpc php-xml php-pear;
RUN yum -y install phpmyadmin phpPgAdmin vim
#RUN yum -y install phpmyadmin phpPgAdmin vim
#RUN yum -y install vim
#RUN yum -y install nginx
RUN yum -y install gcc make vim nginx zip
RUN yum -y update
RUN yum -y install gcc make
RUN yum -y install nginx
RUN pecl install Xdebug
ADD docker_conf/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf
ADD docker_conf/phpPgAdmin.conf /etc/httpd/conf.d/phpPgAdmin.conf
ADD docker_conf/myadmin_config.inc.php /etc/phpMyAdmin/config.inc.php
ADD docker_conf/pgadmin_config.inc.php /etc/phpPgAdmin/config.inc.php
#ADD docker_conf/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf
#ADD docker_conf/phpPgAdmin.conf /etc/httpd/conf.d/phpPgAdmin.conf
#ADD docker_conf/myadmin_config.inc.php /etc/phpMyAdmin/config.inc.php
#ADD docker_conf/pgadmin_config.inc.php /etc/phpPgAdmin/config.inc.php
ADD docker_conf/xdebug.ini /etc/php.d/xdebug.ini

RUN mkdir /etc/nginx/conf.d/common
Expand Down
3 changes: 2 additions & 1 deletion lib/pear/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ public static function closeAll()
$filePointers = &PEAR::getStaticProperty('File', 'filePointers');

// unlock files
for ($i = 0, $c = count($locks); $i < $c; $i++) {
$c = is_array($locks) ? count($locks) : 0;
for ($i = 0; $i < $c; $i++) {
is_resource($locks[$i]) and @flock($locks[$i], LOCK_UN);
}

Expand Down
2 changes: 1 addition & 1 deletion mod/notification/class/NQ.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static function init()

public static function close()
{
if(count(self::$queues) > 0) {
if(is_array(self::$queues) && count(self::$queues) > 0) {
$_SESSION['NotificationQueue'] = serialize(self::$queues);
} else {
if(isset($_SESSION['NotificationQueue'])) {
Expand Down
8 changes: 1 addition & 7 deletions setup/class/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public function testDBConnect($dsn = null)
$mdb2_connection = $tdb->connect($dsn);
if ($mdb2_connection->isConnected()) {
$tables = $mdb2_connection->listTables();
if (count($tables)) {
if ($tables !== null && count($tables) > 0) {
return 2;
} else {
$this->setConfigSet('dsn', $dsn);
Expand Down Expand Up @@ -898,12 +898,6 @@ public function checkServerSettings()
$test['globals']['name'] = 'Register globals disabled';
$test['globals']['crit'] = false;

$test['magic_quotes']['pass'] = !get_magic_quotes_gpc() && !get_magic_quotes_runtime();
$test['magic_quotes']['fail'] = dgettext('core',
'Magic quotes is enabled. Please disable it in your php.ini file.');
$test['magic_quotes']['name'] = 'Magic quotes disabled';
$test['magic_quotes']['crit'] = true;

foreach ($test as $test_section => $val) {
if (!$val['pass']) {
if ($val['crit']) {
Expand Down