Sfoglia il codice sorgente

Merge pull request #1585 from Alkarex/file_get_contents-fix

file_get_contents fix
Alexandre Alapetite 8 anni fa
parent
commit
3e28ca565e
3 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 4 0
      CHANGELOG.md
  2. 1 1
      p/api/greader.php
  3. 1 1
      p/api/pshb.php

+ 4 - 0
CHANGELOG.md

@@ -2,8 +2,12 @@
 
 
 ## 2017-XX-XX FreshRSS 1.7.1-dev
 ## 2017-XX-XX FreshRSS 1.7.1-dev
 
 
+* Bug fixing
+	* PHP 7.1 compatibility for the API [#1584](https://github.com/FreshRSS/FreshRSS/issues/1584)
+
 
 
 ## 2017-06-03 FreshRSS 1.7.0
 ## 2017-06-03 FreshRSS 1.7.0
+
 * Features:
 * Features:
 	* Deferred insertion of new articles, for better chronological order [#530](https://github.com/FreshRSS/FreshRSS/issues/530)
 	* Deferred insertion of new articles, for better chronological order [#530](https://github.com/FreshRSS/FreshRSS/issues/530)
 	* Better search:
 	* Better search:

+ 1 - 1
p/api/greader.php

@@ -23,7 +23,7 @@ Server-side API compatible with Google Reader API layer 2
 require('../../constants.php');
 require('../../constants.php');
 require(LIB_PATH . '/lib_rss.php');	//Includes class autoloader
 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
 if (PHP_INT_SIZE < 8) {	//32-bit
 	function dec2hex($dec) {
 	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);
 	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));
 //logMe(print_r(array('_SERVER' => $_SERVER, '_GET' => $_GET, '_POST' => $_POST, 'INPUT' => $ORIGINAL_INPUT), true));