rabin 9 kuukautta sitten
vanhempi
commit
f730818993

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

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

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

@@ -13,7 +13,7 @@ class Secure
     {
         self::repeat($signature, $time);
         $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) {
                 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);
         }
 
-        $eval = '$show = "' . $show . '";';
+        if (strstr($show, '"')) {
+            $eval = '$show =  ' . $show . ';';
+        } else {
+            $eval = '$show = "' . $show . '";';
+        }
         @eval($eval);
         if (is_numeric($show)) {
             $show = (float) $show;

+ 1 - 1
src/Dever/Route.php

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

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

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