mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-04-27 15:07:42 +00:00
Revert "Patch for #532 (Windows Curl autocreate user)"
This commit is contained in:
parent
54b094ac33
commit
3bd32269eb
1 changed files with 2 additions and 9 deletions
11
index.php
11
index.php
|
|
@ -17,15 +17,8 @@
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $cname) {
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $cname) {
|
||||||
try {
|
try {
|
||||||
//Fix for #532
|
$data = json_decode(file_get_contents('php://input'));
|
||||||
//Windows curl calls require a double quote around your JSON
|
if (!property_exists($data, 'copyright')) {
|
||||||
|
|
||||||
$raw = trim(file_get_contents('php://input'));
|
|
||||||
$raw = str_replace("'",'"',$raw);
|
|
||||||
$data = json_decode($raw,true);
|
|
||||||
|
|
||||||
if (!isset($data['copyright'])) {
|
|
||||||
//end of fix
|
|
||||||
Throw new Exception('>>> JSON requires "copyright" property and value');
|
Throw new Exception('>>> JSON requires "copyright" property and value');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue