Commit 9ce03ea3 authored by git's avatar git Committed by renatog
Browse files

Issue #2672106 by froboy, RenatoG: PHP Warning: Missing argument 2 for...

Issue #2672106 by froboy, RenatoG: PHP Warning: Missing argument 2 for insert_view_substitute_tags() (7.x)
parent d13eda77
Loading
Loading
Loading
Loading
+2 −1
Changes for insert_view.module: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -48,8 +48,9 @@ Valid examples:
/**
 * Helper function to replace the tag syntax with the actual view.
 */
function _insert_view_substitute_tags($text, $format) {
function _insert_view_substitute_tags($text) {
  if (preg_match_all("/\[view:([^=\]]+)=?([^=\]]+)?=?([^\]]*)?\]/i", $text, $match)) {
    $search = $replace = array();
    foreach ($match[0] as $key => $value) {
      $view_name = $match[1][$key];
      $display_id = ($match[2][$key] && !is_numeric($match[2][$key])) ? $match[2][$key] : 'default';