Page 1 of 1

Updating database from 3.2.8 to 3.2.9 has PHP warnings

Posted: Sun Feb 16, 2020 1:37 am
by Lady_G
Support Request Template
What version of phpBB are you using? phpBB 3.2.8
What is your board's URL? http://localhost
Who do you host your board with? -
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? No
What version of phpBB3 did you update from? phpBB 3.2.8
What styles do you currently have installed? prosilver
What language(s) is your board currently using? English, American English language pack
Which database type/version are you using? PostgreSQL
What is your level of experience? Comfortable with PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Update from phpBB 3.2.8.
Please describe your problem. I followed the update procedure as described in Updating 3.2.x, but update the database using the command line as php bin/phpbbcli.php --safe-mode db:migrate. The database update reports these warnings:

Code: Select all

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-stdlib/src/ArrayObject.php on line 426
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 272
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 275
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 281
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 287
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 296
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 314
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/forum/vendor/zendframework/zend-code/src/Reflection/MethodReflection.php on line 319
My first attempt resulted in an Administration Control Panel warning that the update was incomplete. I then restored the version 3.8.2 source files, database, and repeated the update. The database update repeated the warnings, but the Administration Control Panel reports a successful update.

I am holding my production update to 3.2.9. until these warnings are debugged (or understand why they appear). How can these warnings be debugged?

PHP version: 7.2.27

Generated by SRT Generator

Re: Updating database from 3.2.8 to 3.2.9 has PHP warnings

Posted: Sun Feb 16, 2020 1:51 am
by AbaddonOrmuz
Are you sure you're not runnign PHP 7.3?

Code: Select all

php --version
Because that warning is only thrown since PHP 7.3, as per the official documentation:

https://www.php.net/manual/en/control-s ... ntinue.php
7.3.0: continue within a switch that is attempting to act like a break statement for the switch will trigger an E_WARNING.
If you have multiple PHP versions installed, the executable php might be a symlink to the latest version.

I don't know which OS your test server is running on, but in mine (Arch Linux) the executable for PHP 7.2 is php72

Re: Updating database from 3.2.8 to 3.2.9 has PHP warnings

Posted: Sun Feb 16, 2020 2:33 am
by Lady_G
Thank you! That is exactly what I'm doing. Since I'm not running PHP 7.3, I never thought to look in that direction.

My localhost test environment is Fedora Linux. PHP 7.3 is the default install, so I have installed PHP 7.2 as php72. The versions do indeed report as you say.

Code: Select all

php --version
PHP 7.3.14 (cli) (built: Jan 21 2020 09:59:50) ( NTS )

php72 --version
PHP 7.2.27 (cli) (built: Jan 22 2020 07:58:15) ( NTS )
My production server php --version reports PHP 7.2.26, so it should be OK. However, I need to confirm this on my localhost test server.

I'll see if I can modify the symlinks to test this correctly (phpBB will see PHP 7.2 version reported).

Re: Updating database from 3.2.8 to 3.2.9 has PHP warnings

Posted: Sun Feb 16, 2020 2:46 am
by P_I
You can run the CLI update on your test server using

Code: Select all

php72 bin/phpbbcli.php --safe-mode db:migrate

Re: Updating database from 3.2.8 to 3.2.9 has PHP warnings

Posted: Mon Feb 17, 2020 9:16 pm
by Lady_G
I restored my database and implemented your suggested php72 command. That fixed the warnings. Thank you!