File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
CodeIgniter/Framework/core Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -1341,11 +1341,20 @@ public function method($upper = false)
13411341 */
13421342 public function __get ($ name )
13431343 {
1344- if ($ name === 'raw_input_stream ' ) {
1345- isset ($ this ->_raw_input_stream ) or $ this ->_raw_input_stream = file_get_contents ('php://input ' );
1344+
1345+ if ($ this ->has ($ name )) {
1346+ return $ this ->index ($ name , true );
1347+ } elseif (
1348+ $ name === 'raw_input_stream '
1349+ || $ name === 'rawInputStream '
1350+ || $ name === 'getContent '
1351+ ) {
1352+ isset ($ this ->_raw_input_stream ) || $ this ->_raw_input_stream = file_get_contents ('php://input ' );
13461353 return $ this ->_raw_input_stream ;
1347- } elseif ($ name === 'ip_address ' ) {
1348- return $ this ->ip_address ;
1349- }
1354+ } elseif ($ name === 'ip_address ' || $ name === 'ipAddress ' ) {
1355+ return $ this ->ipAddress ();
1356+ } else {
1357+ return null ;
1358+ }
13501359 }
13511360}
You can’t perform that action at this time.
0 commit comments