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

PHP errors when using php 7.2.33 and 7.4.10 (Ubuntu 20.04 LTS) #169

Open
nigel-aves opened this issue Sep 16, 2020 · 4 comments
Open

PHP errors when using php 7.2.33 and 7.4.10 (Ubuntu 20.04 LTS) #169

nigel-aves opened this issue Sep 16, 2020 · 4 comments

Comments

@nigel-aves
Copy link

I've just finishes building a new PIWIGO site, that will feature videos.

Piwigo 2.10.2 Check for upgrade
Operating system: Linux
PHP: 7.4.10 (Show info) [2020-09-15 19:26:54]
MySQL: 8.0.21-0ubuntu0.20.04.4 [2020-09-15 19:26:54]
Graphics Library: External ImageMagick 6.9.10-23

Unfortunately when I try and run the Synchronization I get the following PHP messages ....

For PHP 7.2.33

Warning: array_merge(): Argument #1 is not an array in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 53

Warning: array_merge(): Argument #1 is not an array in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 78

and an error reported ... You ask me to do nothing, are you sure?

For PHP 7.4.10 (It gets a tad worse! )

Warning: array_merge(): Expected parameter 1 to be an array, null given in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 53

Warning: array_merge(): Expected parameter 1 to be an array, null given in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 78

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 90

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 94

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 108

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 114

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_dependencies.php on line 38

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_sync2.php on line 52

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_sync2.php on line 52

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_sync2.php on line 52

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 175

Notice: Trying to access array offset on value of type null in /home/mydomainname.com/public_html/plugins/piwigo-videojs/admin/admin_sync.php on line 190

Warning: Cannot modify header information - headers already sent by (output started at /home/mydomainname.com/public_html/plugins/piwigo-videojs/include/function_sync2.php:52) in /home/mydomainname.com/public_html/include/page_header.php on line 8

@RoystonS
Copy link

Is this the same issue as #130 ?

@nigel-aves
Copy link
Author

I believe it is similar, but looking at #130 that was occuring on PHP 5.6.36-0+deb8u1.

Videojs had been working all through PHP 6.x (and I had no issues when using php 5.x). You'll also notice that you get different "errors" depending on php 7.2 or 7.4. It is my understanding that it might be caused by a change in SQL MariaDB 8, though I also read that php 7.4 hardened the code on error checking.

@RoystonS
Copy link

I did have video working with videojs but now all I get is static preview images instead, so I tried a Synchronisation and got the same error as in #130 (the same one you have here) but I have PHP 7.3. I tried the configuration reset (the bit of SQL mentioned in that issue) and it sorted out the array issues for me with PHP 7.3. (It hasn't fixed my actual videos though.) It might be worth giving that a try to see if it helps, if you haven't already?

@nigel-aves
Copy link
Author

I'm using PHP 7.4 and I know that changes have been made to MariaDB 8. I therefore am very hesitant about running a sql command that might not be compatible. I know that in PIWIGO itself when I moved to PHP 7.4 and MariaDB 8, there had to be changes made to the PHP code for a number of the plugins I was using. PIWIGO itself was also updated for PHP 7.4 / MariaDB 8.

Because the videos are working OK in the web site, I'm going to leave well alone, and hope that someone from the VideoJS team has a look. It was a simple fix for the plugins that didn't work, but I'm no programmer and this looks a tad more complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants