From e285df4f827b8eda57990a33cbb8610b4ed2bb91 Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Sat, 25 Mar 2017 09:30:34 -0400 Subject: [PATCH] optimization, break early --- lib/Cake/Model/CakeSchema.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index 51bab41ab..69d608ba0 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -617,6 +617,7 @@ class CakeSchema extends CakeObject { foreach ($fields as $value) { if (isset($value['key']) && $value['key'] === 'primary') { $hasPrimaryAlready = true; + break; } }