浏览代码

Make `array` the default return value

ndm2 11 年之前
父节点
当前提交
5619f44fd7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Model/Behavior/SoftDeleteBehavior.php

+ 2 - 2
Model/Behavior/SoftDeleteBehavior.php

@@ -387,10 +387,10 @@ class SoftDeleteBehavior extends ModelBehavior {
 	 *
 	 *
 	 * @param Model $model
 	 * @param Model $model
 	 * @param integer $id The ID of the current record
 	 * @param integer $id The ID of the current record
-	 * @return array|null
+	 * @return array
 	 */
 	 */
 	protected function _getCounterCacheKeys(Model $model, $id) {
 	protected function _getCounterCacheKeys(Model $model, $id) {
-		$keys = null;
+		$keys = array();
 		if (!empty($model->belongsTo)) {
 		if (!empty($model->belongsTo)) {
 			foreach ($model->belongsTo as $assoc) {
 			foreach ($model->belongsTo as $assoc) {
 				if (empty($assoc['counterCache'])) {
 				if (empty($assoc['counterCache'])) {