File: /var/www/ojs/lib/pkp/lib/slim-php8.1.diff
diff -u -r Slim/Collection.php Slim/Collection.php
--- Slim/Collection.php 2019-11-28 09:40:33.000000000 -0800
+++ Slim/Collection.php 2022-10-18 21:25:54.603075152 -0700
@@ -109,6 +109,7 @@
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($key)
{
return $this->has($key);
@@ -121,6 +122,7 @@
*
* @return mixed The key's value, or the default value
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->get($key);
@@ -132,6 +134,7 @@
* @param string $key The data key
* @param mixed $value The data value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
$this->set($key, $value);
@@ -142,6 +145,7 @@
*
* @param string $key The data key
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($key)
{
$this->remove($key);
@@ -152,6 +156,7 @@
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return count($this->data);
@@ -162,6 +167,7 @@
*
* @return ArrayIterator
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
return new ArrayIterator($this->data);
diff -u -r Slim/Http/Uri.php Slim/Http/Uri.php
--- Slim/Http/Uri.php 2019-11-28 09:40:33.000000000 -0800
+++ Slim/Http/Uri.php 2022-10-19 07:45:34.196533740 -0700
@@ -718,7 +718,7 @@
function ($match) {
return rawurlencode($match[0]);
},
- $query
+ $query ?? ''
);
}
diff -u -r Slim/Http/Request.php Slim/Http/Request.php
--- Slim/Http/Request.php 2019-11-28 09:40:33.000000000 -0800
+++ Slim/Http/Request.php 2022-10-19 12:56:21.077660825 -0700
@@ -1016,7 +1016,7 @@
// Check if this specific media type has a parser registered first
if (!isset($this->bodyParsers[$mediaType])) {
// If not, look for a media type with a structured syntax suffix (RFC 6839)
- $parts = explode('+', $mediaType);
+ $parts = explode('+', $mediaType ?? '');
if (count($parts) >= 2) {
$mediaType = 'application/' . $parts[count($parts)-1];
}