Skip to content

Commit d5c90a1

Browse files
authored
Set request method on CLI
1 parent 12c32ba commit d5c90a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/CodeIgniter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,12 +986,13 @@ public function storePreviousURL($uri)
986986
* Modifies the Request Object to use a different method if a POST
987987
* variable called _method is found.
988988
*
989-
* Does not work on CLI commands.
990989
*/
991990
public function spoofRequestMethod()
992991
{
992+
// CLI commands always use 'cli' method
993993
if (is_cli())
994994
{
995+
$this->request->setMethod('cli');
995996
return;
996997
}
997998

0 commit comments

Comments
 (0)