jargon

Puzzlum.NET TRK_BulkLink()

Jun 13th, 2021
831
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function trk_bulklink( $in = '' )
  2. {
  3.     $pattern = '/(.*){{(.*)}}(.*)/';
  4.     for( ; preg_match_all( $pattern, $in, $matches ) ; )
  5.     {
  6.         trk_echo3('matches',$matches);
  7.         $params = explode( '|', $matches[ 2 ] );
  8.        
  9.         $temp =
  10.         '<a href="?'. $params[ 1 ] .
  11.         '='. $params[ 2 ] .
  12.         '">'.
  13.         ( isset( $params[ 3 ] ) ? ( '<img src="' . $params[ 3 ] . '">' ) : '' ) .
  14.         ( ( isset( $params[ 3 ] ) && isset( $params[ 4 ] ) ) ? ( '<br>' ) : '' ) .
  15.         ( isset( $params[ 4 ] ) ? ( '<img src="' . $params[ 3 ] . '">' ) : '' ) .
  16.         '</a>';
  17.    
  18.         $in = str_replace( $matches[ 0 ], $temp, $in );
  19.    
  20.     }
  21. }
  22.  
  23.  
  24. ===
  25.  
  26. Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in C:\xampp8\htdocs\puzzlum.net\php\trk swaps.php:9 Stack trace: #0 C:\xampp8\htdocs\puzzlum.net\php\trk swaps.php(9): explode('|', Array) #1 C:\xampp8\htdocs\puzzlum.net\index.php(131): trk_bulklink('<style>{{font.m...') #2 {main} thrown in C:\xampp8\htdocs\puzzlum.net\php\trk swaps.php on line 9
  27.  
  28. Line 9:
  29. $params = explode( '|', $matches[ 2 ] );
  30.        
  31.  
RAW Paste Data