Skip to content
Browse files

Fix Strict 'pass by reference' warning by not calling array_shift() o…

…n the direct result of array_shift()

Strict Standards: Only variables should be passed by reference in
path/ad-code-manager/ad-code-manager.php on line 1003
  • Loading branch information...
1 parent 746f97e commit cec42cda864a8a21866e62ead5b7f8f80cf85bca @nickdaugherty nickdaugherty committed Jan 21, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 ad-code-manager.php
View
5 ad-code-manager.php
@@ -1000,7 +1000,10 @@ public function get_matching_ad_code( $tag_id ) {
$prioritized_display_codes[$priority][] = $display_code;
}
ksort( $prioritized_display_codes, SORT_NUMERIC );
- $code_to_display = array_shift( array_shift( $prioritized_display_codes ) );
+
+ $shifted_prioritized_display_codes = array_shift( $prioritized_display_codes );
+
+ $code_to_display = array_shift( $shifted_prioritized_display_codes );
wp_cache_add( $cache_key, $code_to_display, 'acm', 600 );

0 comments on commit cec42cd

Please sign in to comment.
Something went wrong with that request. Please try again.