FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16748&edit=1

ID: 16748
Updated by: alex@pc4p.net
Reported By: hh at fsck dot dk
Summary: Array to string conversion
-Status: Open
+Status: Bogus
Type: Bug
Package: Services_Weather
Operating System: Linux (ubuntu)
Package Version: 1.4.4
PHP Version: 5.2.5
Roadmap Versions:
New Comment:

-Status: Open
+Status: Bogus
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PEAR.

Duplicate of #14732


Previous Comments:
------------------------------------------------------------------------

[2009-10-29 12:37:33] hh

Description:
------------
I get two nitices when using Aalborg, Denmark as location, they are:

Notice: Array to string conversion in
/usr/share/php/Services/Weather/Metar.php on line 566

Notice: Array to string conversion in
/usr/share/php/Services/Weather/Metar.php on line 1062

This seems to fix it, but I don't know if it's correct:

if (!is_array($data)) {
if (strpos($data, "=") !== false) {
$data = substr($data, 0, strpos($data, "="));
}
} else {
foreach ($data as $key => $val) {
if (strpos($val, "=") !== false) {
$val = substr($val, 0, strpos($val, "="));
}
$data[$key] = $val;
}
}

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 3, '09 at 11:28p
activeNov 3, '09 at 11:28p
posts1
users1
websitepear.php.net

1 user in discussion

Alex: 1 post

People

Translate

site design / logo © 2022 Grokbase