Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
Fix warning with PHP 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 11, 2019
1 parent a131491 commit c2f9509
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v4.1.3] - 2019-01-10
### Fixed
- Fix warning with PHP 7.3

## [v4.1.2] - 2018-11-13
### Fixed
- Updated Run Method to add NameSpace Array ([#23](https://github.com/userfrosting/fortress/pull/23))
Expand All @@ -24,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Implement equals, not_equals, telephone, uri, and username rules


[v4.1.3]: https://github.com/userfrosting/fortress/compare/v4.1.2...v4.1.3
[v4.1.2]: https://github.com/userfrosting/fortress/compare/v4.1.1...v4.1.2
[v4.1.1]: https://github.com/userfrosting/fortress/compare/4.1.0...v4.1.1
[4.1.0]: https://github.com/userfrosting/fortress/compare/4.0.1...4.1.0
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Fortress 4

[![Latest Version](https://img.shields.io/github/release/userfrosting/fortress.svg)](https://github.com/userfrosting/fortress/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
[![Build Status](https://travis-ci.org/userfrosting/fortress.svg?branch=master)](https://travis-ci.org/userfrosting/fortress)
[![codecov](https://codecov.io/gh/userfrosting/fortress/branch/master/graph/badge.svg)](https://codecov.io/gh/userfrosting/fortress)
[![Join the chat at https://chat.userfrosting.com/channel/support](https://demo.rocket.chat/images/join-chat.svg)](https://chat.userfrosting.com/channel/support)
[![Backers on Open Collective](https://opencollective.com/userfrosting/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/userfrosting/sponsors/badge.svg)](#sponsors)

<a href="https://opencollective.com/userfrosting#backer" target="_blank">
<img src="https://opencollective.com/userfrosting/donate/button.png?color=blue" width=300 />
</a>
[![Donate](https://img.shields.io/badge/Open%20Collective-Donate-blue.svg)](https://opencollective.com/userfrosting#backer)

If you simply want to show that you like this project, or want to remember it for later, you should **star**, not **fork**, this repository. Forking is only for when you are ready to create your own copy of the code to work on.

Expand Down
9 changes: 7 additions & 2 deletions src/RequestDataTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ public function transform(array $data, $onUnexpectedVar = 'skip')
// Handle values not listed in the schema
if (!array_key_exists($name, $schemaFields)) {
switch ($onUnexpectedVar) {
case 'allow': $transformedData[$name] = $value; break;
case 'allow':
$transformedData[$name] = $value;
break;
case 'error':
$e = new BadRequestException("The field '$name' is not a valid input field.");
throw $e;
break;
case 'skip': default: continue;
case 'skip':
default:
continue 2;
break;
}
} else {
$transformedData[$name] = $this->transformField($name, $value);
Expand Down

0 comments on commit c2f9509

Please sign in to comment.