Ver código fonte

Fixes an error 'Strict Standards: Only variables should be passed by reference'

Would see this on some systems when saving call forward
FusionPBX 3 anos atrás
pai
commit
789170b95b
1 arquivos alterados com 7 adições e 4 exclusões
  1. 7 4
      resources/classes/database.php

+ 7 - 4
resources/classes/database.php

@@ -17,7 +17,7 @@
 
 
 	The Initial Developer of the Original Code is
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
 	Mark J Crane <[email protected]>
-	Copyright (C) 2010 - 2020
+	Copyright (C) 2010 - 2022
 	All Rights Reserved.
 	All Rights Reserved.
 
 
 	Contributor(s):
 	Contributor(s):
@@ -1039,12 +1039,15 @@ include "root.php";
 						}
 						}
 						$statement->bindParam(':remote_address', $_SERVER['REMOTE_ADDR']);
 						$statement->bindParam(':remote_address', $_SERVER['REMOTE_ADDR']);
 						if (is_array($old_array)) {
 						if (is_array($old_array)) {
-							$statement->bindParam(':transaction_old', json_encode($old_array, JSON_PRETTY_PRINT));
+							$old_json = json_encode($old_array, JSON_PRETTY_PRINT);
+							$statement->bindParam(':transaction_old', $old_json);
 						}
 						}
 						if (is_array($new_array)) {
 						if (is_array($new_array)) {
-							$statement->bindParam(':transaction_new', json_encode($new_array, JSON_PRETTY_PRINT));
+							$new_json = json_encode($new_array, JSON_PRETTY_PRINT);
+							$statement->bindParam(':transaction_new', $new_json);
 						}
 						}
-						$statement->bindParam(':transaction_result', json_encode($this->message, JSON_PRETTY_PRINT));
+						$result = json_encode($this->message, JSON_PRETTY_PRINT);
+						$statement->bindParam(':transaction_result', $result);
 						$statement->execute();
 						$statement->execute();
 						unset($sql);
 						unset($sql);
 					}
 					}