Explorar o código

file_get_contents fix

PHP 7.1 https://github.com/FreshRSS/FreshRSS/issues/1584
Alexandre Alapetite %!s(int64=8) %!d(string=hai) anos
pai
achega
8af80091c7
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      p/api/greader.php
  2. 1 1
      p/api/pshb.php

+ 1 - 1
p/api/greader.php

@@ -23,7 +23,7 @@ Server-side API compatible with Google Reader API layer 2
 require('../../constants.php');
 require(LIB_PATH . '/lib_rss.php');	//Includes class autoloader
 
-$ORIGINAL_INPUT = file_get_contents('php://input', false, null, -1, 1048576);
+$ORIGINAL_INPUT = file_get_contents('php://input', false, null, 0, 1048576);
 
 if (PHP_INT_SIZE < 8) {	//32-bit
 	function dec2hex($dec) {

+ 1 - 1
p/api/pshb.php

@@ -11,7 +11,7 @@ function logMe($text) {
 	file_put_contents(USERS_PATH . '/_/log_pshb.txt', date('c') . "\t" . $text . "\n", FILE_APPEND);
 }
 
-$ORIGINAL_INPUT = file_get_contents('php://input', false, null, -1, MAX_PAYLOAD);
+$ORIGINAL_INPUT = file_get_contents('php://input', false, null, 0, MAX_PAYLOAD);
 
 //logMe(print_r(array('_SERVER' => $_SERVER, '_GET' => $_GET, '_POST' => $_POST, 'INPUT' => $ORIGINAL_INPUT), true));