Skip to content
Permalink
Browse files

♻️ Rename flag to better show actual effect

This flag only causes parameters with empty strings to be skipped,
not all empty() values.
  • Loading branch information...
micgro42 committed Jun 29, 2018
1 parent fdbbfed commit 8fd93981034d74dcd6bea52bde837e660e1d71d1
Showing with 4 additions and 4 deletions.
  1. +4 −4 inc/common.php
@@ -356,16 +356,16 @@ function buildURLparams($params, $sep = '&') {
*
* @author Andreas Gohr
*
* @param array $params array with (attribute name-attribute value) pairs
* @param bool $skipempty skip empty string values?
* @param array $params array with (attribute name-attribute value) pairs
* @param bool $skipEmptyStrings skip empty string values?
* @return string
*/
function buildAttributes($params, $skipempty = false) {
function buildAttributes($params, $skipEmptyStrings = false) {
$url = '';
$white = false;
foreach($params as $key => $val) {
if($key{0} == '_') continue;
if($val === '' && $skipempty) continue;
if($val === '' && $skipEmptyStrings) continue;
if($white) $url .= ' ';
$url .= $key.'="';

0 comments on commit 8fd9398

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.