that one i have also reported long ago
[23-May-2014 18:02:41 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845 [23-May-2014 18:03:02 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845 [23-May-2014 18:03:14 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845 [23-May-2014 18:03:15 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845 [24-May-2014 02:23:54 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845 [24-May-2014 02:33:33 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845
On 05/25/2014 10:53 AM, Reindl Harald wrote:
[23-May-2014 18:02:41 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845
I applied the fix, I suppose this happens for some malformed messages (or malformed bodystructure), but would be good to know for sure. Could you provide some samples?
Am 25.05.2014 13:00, schrieb A.L.E.C:
On 05/25/2014 10:53 AM, Reindl Harald wrote:
[23-May-2014 18:02:41 Europe/Vienna] PHP Warning: strtolower() expects parameter 1 to be string, array given in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 1845
I applied the fix, I suppose this happens for some malformed messages (or malformed bodystructure), but would be good to know for sure. Could you provide some samples?
to can do that i would need a better handling of that like at least some code-snippet as follows:
if(is_array($whatever)) { error_log('username: serialize($whatever))); } else { strtolower($whatever) }
without that i have only anonymous warnings whitout any idea what message of what user making it impossible to dig deeper - with a lot of users it's wild guessing
On 05/25/2014 05:46 PM, Reindl Harald wrote:
to can do that i would need a better handling of that like at least some code-snippet as follows:
Before the line with strtolower() add:
if (is_array($headers->ctype)) { console($_SESSION['username'].":$folder:$uid"); console($headers); }
Am 26.05.2014 08:24, schrieb A.L.E.C:
On 05/25/2014 05:46 PM, Reindl Harald wrote:
to can do that i would need a better handling of that like at least some code-snippet as follows:
Before the line with strtolower() add:
if (is_array($headers->ctype)) { console($_SESSION['username'].":$folder:$uid"); console($headers); }
i added that patch now to my RPM-Build
IMHO that should be part of the release because it's much more helful than unspecific warnings and leads to find the root cause
hopefully console() and $headers exists at that level :-)
[builduser@buildserver64:/rpmbuild/SOURCES]$ cat roundcubemail-str_to_lower_warning.patch --- roundcubemail-1.0.1-dep-original/program/lib/Roundcube/rcube_imap.php 2014-05-09 16:09:02.000000000 +0200 +++ roundcubemail-1.0.1-dep-patched/program/lib/Roundcube/rcube_imap.php 2014-05-26 10:28:08.809852444 +0200 @@ -1841,8 +1841,13 @@ */
// regular part
$struct->ctype_primary = strtolower($part[0]);
$struct->ctype_secondary = strtolower($part[1]);
if(is_array($part[0]) || is_array($part[1]))
{
console($_SESSION['username'].":$folder:$uid");
console($headers);
}
$struct->ctype_primary = @strtolower($part[0]);
$struct->ctype_secondary = @strtolower($part[1]);
$struct->mimetype = $struct->ctype_primary.'/'.$struct->ctype_secondary;
// read content type parameters
On 05/26/2014 10:31 AM, Reindl Harald wrote:
hopefully console() and $headers exists at that level :-)
Oops, it looks that we were looking at different lines of code.
// regular part
$struct->ctype_primary = strtolower($part[0]);
$struct->ctype_secondary = strtolower($part[1]);
if(is_array($part[0]) || is_array($part[1]))
{
console($_SESSION['username'].":$folder:$uid");
console($headers);
}
Here, none of used variables exist. You need to change this to
console($_SESSION['username'].":".$this->folder.":".$this->msg_uid); console($part);
Am 26.05.2014 10:41, schrieb A.L.E.C:
On 05/26/2014 10:31 AM, Reindl Harald wrote:
hopefully console() and $headers exists at that level :-)
Oops, it looks that we were looking at different lines of code.
how comes? the line number is part of the subject :-)
// regular part
$struct->ctype_primary = strtolower($part[0]);
$struct->ctype_secondary = strtolower($part[1]);
if(is_array($part[0]) || is_array($part[1]))
{
console($_SESSION['username'].":$folder:$uid");
console($headers);
}
Here, none of used variables exist. You need to change this to
console($_SESSION['username'].":".$this->folder.":".$this->msg_uid); console($part);
[builduser@buildserver64:/rpmbuild/SOURCES]$ cat roundcubemail-str_to_lower_warning.patch --- roundcubemail-1.0.1-dep-original/program/lib/Roundcube/rcube_imap.php 2014-05-09 16:09:02.000000000 +0200 +++ roundcubemail-1.0.1-dep-patched/program/lib/Roundcube/rcube_imap.php 2014-05-26 10:45:10.103016023 +0200 @@ -1841,8 +1841,13 @@ */
// regular part
$struct->ctype_primary = strtolower($part[0]);
$struct->ctype_secondary = strtolower($part[1]);
if(is_array($part[0]) || is_array($part[1]))
{
console($_SESSION['username'].":".$this->folder.":".$this->msg_uid);
console($part);
}
$struct->ctype_primary = @strtolower($part[0]);
$struct->ctype_secondary = @strtolower($part[1]);
$struct->mimetype = $struct->ctype_primary.'/'.$struct->ctype_secondary;
// read content type parameters
On 05/26/2014 10:46 AM, Reindl Harald wrote:
Oops, it looks that we were looking at different lines of code.
how comes? the line number is part of the subject :-)
I was looking into master branch, found strtolower() call, and didn't notice you're referring to 1.0.