Re: Deprecated: Automatic conversion of false to array is deprecated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm learning that the SVN version available as a tarball is different than
the "svn checkout" trunk version available on sf.net. I somehow missed that
the SVN development version of 1.4.23 was different than the stable version
of 1.4.23. This is the version that works:

svn checkout https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail



On Tue, Feb 14, 2023 at 7:24 AM Alex <mysqlstudent@xxxxxxxxx> wrote:

> Hi, this appears to be another issue related to php-8.1 compatibility. I
> think this fixes it.
>
> --- functions/file_prefs.php-foreach    2023-02-13 19:09:58.956959936 -0500
> +++ functions/file_prefs.php    2023-02-13 19:10:10.975099888 -0500
> @@ -125,7 +125,7 @@
>          logout_error( sprintf( _("Preference file, %s, could not be
> opened. Contact your system administrator to resolve this issue."),
> $filename.'.tmp') );
>          exit;
>      }
> -    foreach ($prefs_cache as $Key => $Value) {
> +    foreach ((array) $prefs_cache as $Key => $Value) {
>          if (isset($Value)) {
>              if ( sq_fwrite($file, $Key . '=' . $Value . "\n") === FALSE )
> {
>                 logout_error( sprintf( _("Preference file, %s, could not
> be written. Contact your system administrator to resolve this issue.") ,
> $filename . '.tmp') );
>
>
>
> On Sun, Feb 12, 2023 at 2:12 PM Alex <mysqlstudent@xxxxxxxxx> wrote:
>
>> Hi, I think this is all that's necessary to fix the problem, but I'm not
>> a php developer, so I don't know if it's complete:
>>
>> diff -u squirrelmail.stable/functions/file_prefs.php
>> squirrelmail-021223/functions/file_prefs.php
>> --- squirrelmail.stable/functions/file_prefs.php        2023-01-02
>> 20:22:36.000000000 -0500
>> +++ squirrelmail-021223/functions/file_prefs.php        2023-02-12
>> 14:08:13.590538709 -0500
>> @@ -71,6 +71,7 @@
>>              }
>>
>>              if ($value != '') {
>> +               $prefs_cache = [];
>>                  $prefs_cache[$key] = $value;
>>              }
>>          }
>>
>>
>>
>> On Sun, Feb 12, 2023 at 12:13 PM Alex <mysqlstudent@xxxxxxxxx> wrote:
>>
>>> Hi, following up with my previous email -
>>>
>>> It does look like there's still a problem. After installing the lockout
>>> and compatibility plugin, it produces these deprecated errors:
>>>
>>> Deprecated: Automatic conversion of false to array is deprecated in
>>> /usr/share/squirrelmail/functions/file_prefs.php on line 74
>>> Warning: session_regenerate_id(): Session ID cannot be regenerated after
>>> headers have already been sent in /usr/share/squirrelmail/src/redirect.php
>>> on line 123
>>> Warning: Cannot modify header information - headers already sent by
>>> (output started at /usr/share/squirrelmail/functions/file_prefs.php:74) in
>>> /usr/share/squirrelmail/functions/global.php on line 600
>>> Deprecated: Automatic conversion of false to array is deprecated in
>>> /usr/share/squirrelmail/functions/file_prefs.php on line 74
>>> Deprecated: Automatic conversion of false to array is deprecated in
>>> /usr/share/squirrelmail/functions/file_prefs.php on line 74
>>> Warning: Cannot modify header information - headers already sent by
>>> (output started at /usr/share/squirrelmail/functions/file_prefs.php:74) in
>>> /usr/share/squirrelmail/src/redirect.php on line 233
>>>
>>> Thanks,
>>> Alex
>>>
>>>
>>> On Sun, Feb 12, 2023 at 11:36 AM Alex <mysqlstudent@xxxxxxxxx> wrote:
>>>
>>>> Hi, okay, I figured it out, thankfully. While I had a recent svn 1.4.23
>>>> snapshot, apparently it wasn't recent enough. The one from today (Feb 12,
>>>> 2023) works.
>>>>
>>>> What is the proper way to upgrade squirrelmail? I've just been building
>>>> two separate trees and manually going through each to identify differences
>>>> using diff or entire directories at a time, but is there a better way? I
>>>> don't think I've properly migrated all the plugins, for example, including
>>>> the configuration of each...
>>>>
>>>>
>>>>
>>>> On Sun, Feb 12, 2023 at 11:02 AM Alex <mysqlstudent@xxxxxxxxx> wrote:
>>>>
>>>>> Hi, I'm using 1.4.22 on fedora36 with php-8.1 and receiving the
>>>>> following errors. I thought SM supported php-8? Or is it a different
>>>>> problem? This happens after logging in and redirect.php being loaded.
>>>>>
>>>>> I shouldn't have done this on a production machine, so I'm really
>>>>> hoping there's an easy fix :-(
>>>>>
>>>>> Deprecated: Automatic conversion of false to array is deprecated in
>>>>> /usr/share/squirrelmail/functions/file_prefs.php on line 74
>>>>>
>>>>> Warning: session_regenerate_id(): Session ID cannot be regenerated
>>>>> after headers have already been sent in
>>>>> /usr/share/squirrelmail/src/redirect.php on line 123
>>>>>
>>>>> Warning: Cannot modify header information - headers already sent by
>>>>> (output started at /usr/share/squirrelmail/functions/file_prefs.php:74) in
>>>>> /usr/share/squirrelmail/functions/global.php on line 600
>>>>>
>>>>> Deprecated: Automatic conversion of false to array is deprecated in
>>>>> /usr/share/squirrelmail/functions/file_prefs.php on line 74
>>>>>
>>>>> Deprecated: Automatic conversion of false to array is deprecated in
>>>>> /usr/share/squirrelmail/functions/file_prefs.php on line 74
>>>>>
>>>>> Warning: Cannot modify header information - headers already sent by
>>>>> (output started at /usr/share/squirrelmail/functions/file_prefs.php:74) in
>>>>> /usr/share/squirrelmail/src/redirect.php on line 233
>>>>>
>>>>

-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users



[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux