@@ -874,15 +874,18 @@ public function updateType(string $app, string $key, int $type = self::VALUE_MIX
874874 * @param string $key config key
875875 * @param bool $sensitive TRUE to set as sensitive, FALSE to unset
876876 *
877- * @return bool TRUE if database update were necessary
878- * @throws AppConfigUnknownKeyException if config key is not known
877+ * @return bool TRUE if entry was found in database and an update was necessary
879878 * @since 29.0.0
880879 */
881880 public function updateSensitive (string $ app , string $ key , bool $ sensitive ): bool {
882881 $ this ->assertParams ($ app , $ key );
883882 $ this ->loadConfigAll ();
884883
885- if ($ sensitive === $ this ->isSensitive ($ app , $ key , null )) {
884+ try {
885+ if ($ sensitive === $ this ->isSensitive ($ app , $ key , null )) {
886+ return false ;
887+ }
888+ } catch (AppConfigUnknownKeyException $ e ) {
886889 return false ;
887890 }
888891
@@ -914,15 +917,18 @@ public function updateSensitive(string $app, string $key, bool $sensitive): bool
914917 * @param string $key config key
915918 * @param bool $lazy TRUE to set as lazy loaded, FALSE to unset
916919 *
917- * @return bool TRUE if database update was necessary
918- * @throws AppConfigUnknownKeyException if config key is not known
920+ * @return bool TRUE if entry was found in database and an update was necessary
919921 * @since 29.0.0
920922 */
921923 public function updateLazy (string $ app , string $ key , bool $ lazy ): bool {
922924 $ this ->assertParams ($ app , $ key );
923925 $ this ->loadConfigAll ();
924926
925- if ($ lazy === $ this ->isLazy ($ app , $ key )) {
927+ try {
928+ if ($ lazy === $ this ->isLazy ($ app , $ key )) {
929+ return false ;
930+ }
931+ } catch (AppConfigUnknownKeyException $ e ) {
926932 return false ;
927933 }
928934
0 commit comments