Page MenuHomePhorge

Debian 11: warning in /usr/share/php/HTTP/Request2.php
Closed, ResolvedPublic

Description

When using kolab-webadmin I get in /var/log/kolab-webadmin/errors:

[30-Jun-2024 01:03:25 Europe/Berlin] PHP Deprecated:  Function get_magic_quotes_runtime() is deprecated in /usr/share/php/HTTP/Request2.php on line 935

In obs we have:

ii  php-http-request2 2.3.0-1~kolab1 all          Provides an easy way to perform HTTP requests

Upstream is at https://github.com/pear/HTTP_Request2 with release 2.6.0 where the warning is fixed. Local fix could be removing:

933         // magic_quotes_runtime may break file uploads and chunked response
934         // processing; see bug #4543. Don't use ini_get() here; see bug #16440.
935         if ($magicQuotes = get_magic_quotes_runtime()) {
936             set_magic_quotes_runtime(false);
937         }

Details

Ticket Type
Task

Event Timeline

Short term, we should update the php-http-request2 package. 2.6.0 supports PHP >= 5.6 still, so there's no issue with that.

Long term, we should replace uses of this library with Guzzle HTTP client. We did that in some places, but not everywhere.

sicherha claimed this task.

The package has been updated; closing this task.