rabin 9 ماه پیش
والد
کامیت
f730818993
5فایلهای تغییر یافته به همراه15 افزوده شده و 5 حذف شده
  1. 5 1
      src/Dever/Helper/Curl.php
  2. 1 1
      src/Dever/Helper/Secure.php
  3. 5 1
      src/Dever/Helper/Str.php
  4. 1 1
      src/Dever/Route.php
  5. 3 1
      src/Dever/Store/Base.php

+ 5 - 1
src/Dever/Helper/Curl.php

@@ -204,11 +204,15 @@ class Curl
                 $data = count($data) . ' records';
                 $data = count($data) . ' records';
             }
             }
             $debug['url'] = $this->url;
             $debug['url'] = $this->url;
-            $debug['param'] = $this->param;
+            $debug['body'] = $this->param;
+            $debug['header'] = $this->header;
             $debug['result'] = $data;
             $debug['result'] = $data;
             if ($this->log) {
             if ($this->log) {
                 Dever::log($debug, 'curl');
                 Dever::log($debug, 'curl');
             }
             }
+            if (Dever::input('test') == 1) {
+                echo Dever::json_encode($debug);die;
+            }
             Dever::debug($debug, 'curl');
             Dever::debug($debug, 'curl');
             if (isset($setting['stream'])) {
             if (isset($setting['stream'])) {
                 exit;
                 exit;

+ 1 - 1
src/Dever/Helper/Secure.php

@@ -13,7 +13,7 @@ class Secure
     {
     {
         self::repeat($signature, $time);
         self::repeat($signature, $time);
         $auth = Dever::json_decode(self::decode($signature));
         $auth = Dever::json_decode(self::decode($signature));
-        if (isset($auth[0]) && isset($auth[1]) && $auth[0] && $auth[0] > 0) {
+        if (isset($auth[0]) && isset($auth[1]) && $auth[0]) {
             if (time() - $auth[1] < $time) {
             if (time() - $auth[1] < $time) {
                 return array('uid' => $auth[0], 'time' => $auth[1], 'extend' => $auth[2]);
                 return array('uid' => $auth[0], 'time' => $auth[1], 'extend' => $auth[2]);
             }
             }

+ 5 - 1
src/Dever/Helper/Str.php

@@ -295,7 +295,11 @@ class Str
             $show = preg_replace_callback('/{(.*?)}/', $func, $show);
             $show = preg_replace_callback('/{(.*?)}/', $func, $show);
         }
         }
 
 
-        $eval = '$show = "' . $show . '";';
+        if (strstr($show, '"')) {
+            $eval = '$show =  ' . $show . ';';
+        } else {
+            $eval = '$show = "' . $show . '";';
+        }
         @eval($eval);
         @eval($eval);
         if (is_numeric($show)) {
         if (is_numeric($show)) {
             $show = (float) $show;
             $show = (float) $show;

+ 1 - 1
src/Dever/Route.php

@@ -1,7 +1,7 @@
 <?php namespace Dever;
 <?php namespace Dever;
 class Route
 class Route
 {
 {
-    protected static $data = array();
+    public static $data = array();
     protected static $type = '?l=';
     protected static $type = '?l=';
     public static function input($key = false, $condition = '', $lang = '', $value = '')
     public static function input($key = false, $condition = '', $lang = '', $value = '')
     {
     {

+ 3 - 1
src/Dever/Store/Base.php

@@ -1,5 +1,7 @@
 <?php namespace Dever\Store;
 <?php namespace Dever\Store;
+use Dever;
 use Dever\Debug;
 use Dever\Debug;
+use Dever\Output;
 class Base
 class Base
 {
 {
     protected $read;
     protected $read;
@@ -29,7 +31,7 @@ class Base
     }
     }
     protected function error($msg)
     protected function error($msg)
     {
     {
-        Debug::out($msg, $this->type);
+        Output::error(Dever::json_encode($msg));
     }
     }
     protected function log($msg)
     protected function log($msg)
     {
     {