Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php |
— | — | @@ -1553,14 +1553,17 @@ |
1554 | 1554 | if ( isset( $this->dataConstraints[ $field ] ) && is_string( $value ) ) { |
1555 | 1555 | |
1556 | 1556 | // Truncate the field if it has a length specified |
1557 | | - $length = isset( $this->dataConstraints[ $field ]['length']) ? (integer) $this->dataConstraints[ $field ]['length'] : false; |
| 1557 | + if ( isset( $this->dataConstraints[ $field ]['length'] ) ) { |
| 1558 | + $length = (integer) $this->dataConstraints[ $field ]['length']; |
| 1559 | + } else { |
| 1560 | + $length = false; |
| 1561 | + } |
1558 | 1562 | |
1559 | 1563 | if ( !empty( $length ) && !empty( $value ) ) { |
1560 | 1564 | $value = substr( $value, 0, $length ); |
1561 | 1565 | } |
1562 | | - } |
1563 | | - else { |
1564 | | - |
| 1566 | + |
| 1567 | + } else { |
1565 | 1568 | $this->log( 'Field does not exist in $this->dataConstraints[ ' . ( string ) $field . ' ]', LOG_DEBUG ); |
1566 | 1569 | } |
1567 | 1570 | |