File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,11 @@ public function addOrUpdate($field, $value) {
8888 * @return $this
8989 */
9090 public function addExpr ($ str ) {
91- $ this ->fields [] = func_get_args ();
91+ if (count (func_get_args ()) > 1 ) {
92+ $ this ->fields [] = func_get_args ();
93+ } else {
94+ $ this ->fields [] = $ str ;
95+ }
9296 return $ this ;
9397 }
9498
@@ -98,7 +102,11 @@ public function addExpr($str) {
98102 * @return $this
99103 */
100104 public function updateExpr ($ str ) {
101- $ this ->update [] = func_get_args ();
105+ if (count (func_get_args ()) > 1 ) {
106+ $ this ->update [] = func_get_args ();
107+ } else {
108+ $ this ->update [] = $ str ;
109+ }
102110 return $ this ;
103111 }
104112
@@ -107,8 +115,13 @@ public function updateExpr($str) {
107115 * @return $this
108116 */
109117 public function addOrUpdateExpr ($ str ) {
110- $ this ->fields [] = func_get_args ();
111- $ this ->update [] = func_get_args ();
118+ if (count (func_get_args ()) > 1 ) {
119+ $ this ->fields [] = func_get_args ();
120+ $ this ->update [] = func_get_args ();
121+ } else {
122+ $ this ->fields [] = $ str ;
123+ $ this ->update [] = $ str ;
124+ }
112125 return $ this ;
113126 }
114127
You can’t perform that action at this time.
0 commit comments