- foreach ( $fields as $bit => $key ) {
- $params[':assoc:old'][$key] = (bool)( $old & $bit );
- $params[':assoc:new'][$key] = (bool)( $new & $bit );
+
+ if ( isset( $rawParams['6::ofield'] ) ) {
+ $old = $this->parseBitField( $rawParams['6::ofield'] );
+ $params[':assoc:old'] = [ 'bitmask' => $old ];
+ foreach ( $fields as $bit => $key ) {
+ $params[':assoc:old'][$key] = (bool)( $old & $bit );
+ }
+ }
+ if ( isset( $rawParams['7::nfield'] ) ) {
+ $new = $this->parseBitField( $rawParams['7::nfield'] );
+ $params[':assoc:new'] = [ 'bitmask' => $new ];
+ foreach ( $fields as $bit => $key ) {
+ $params[':assoc:new'][$key] = (bool)( $new & $bit );
+ }