@@ -25,26 +25,26 @@ |
||
| 25 | 25 | return $this->_getFiltered( $this->_getSectionName() ); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - public function getModel() { |
|
| 29 | - return $this->get() . '[' . $this->sIndexMark . ']'; |
|
| 28 | + public function getModel() { |
|
| 29 | + return $this->get().'['.$this->sIndexMark.']'; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * @return string |
| 34 | 34 | */ |
| 35 | - protected function _getSectionName( $isIndex=null ) { |
|
| 35 | + protected function _getSectionName( $isIndex = null ) { |
|
| 36 | 36 | |
| 37 | 37 | $this->aArguments = $this->aArguments + array( |
| 38 | 38 | 'section_id' => null, |
| 39 | 39 | '_index' => null, |
| 40 | 40 | ); |
| 41 | - if( isset( $isIndex ) ) { |
|
| 41 | + if ( isset( $isIndex ) ) { |
|
| 42 | 42 | $this->aArguments[ '_index' ] = $isIndex; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $_aNameParts = $this->aArguments[ '_section_path_array' ]; |
| 46 | 46 | if ( isset( $this->aArguments[ 'section_id' ], $this->aArguments[ '_index' ] ) ) { |
| 47 | - $_aNameParts[] = $this->aArguments[ '_index' ]; |
|
| 47 | + $_aNameParts[ ] = $this->aArguments[ '_index' ]; |
|
| 48 | 48 | } |
| 49 | 49 | $_sResult = $this->_getInputNameConstructed( $_aNameParts ); |
| 50 | 50 | return $_sResult; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | return $this->_getFiltered( $this->_getSectionName() ); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - public function getModel() { |
|
| 28 | + public function getModel() { |
|
| 29 | 29 | return $this->get() . '[' . $this->sIndexMark . ']'; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | * @return string The set class selector(s). |
| 128 | 128 | */ |
| 129 | 129 | public function addClass( /* $asSelectors1, $asSelectors2 */ ) { |
| 130 | - foreach( func_get_args() as $_asSelectors ) { |
|
| 130 | + foreach( func_get_args() as $_asSelectors ) { |
|
| 131 | 131 | $this->aAttributes['class'] = $this->getClassAttribute( |
| 132 | 132 | $this->aAttributes['class'], |
| 133 | 133 | $_asSelectors |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | * @param array $aAttributes The attribute array. A field definition array is deprecated. |
| 64 | 64 | * @param array $aOptions options that allows the user to set custom container tags and class selectors. |
| 65 | 65 | */ |
| 66 | - public function __construct( array $aAttributes, array $aOptions=array() ) { |
|
| 66 | + public function __construct( array $aAttributes, array $aOptions = array() ) { |
|
| 67 | 67 | |
| 68 | - $this->aAttributes = $this->getElementAsArray( |
|
| 68 | + $this->aAttributes = $this->getElementAsArray( |
|
| 69 | 69 | $aAttributes, |
| 70 | 70 | 'attributes', |
| 71 | 71 | $aAttributes // if the above key is not set, this will be set |
@@ -127,13 +127,13 @@ discard block |
||
| 127 | 127 | * @return string The set class selector(s). |
| 128 | 128 | */ |
| 129 | 129 | public function addClass( /* $asSelectors1, $asSelectors2 */ ) { |
| 130 | - foreach( func_get_args() as $_asSelectors ) { |
|
| 131 | - $this->aAttributes['class'] = $this->getClassAttribute( |
|
| 132 | - $this->aAttributes['class'], |
|
| 130 | + foreach ( func_get_args() as $_asSelectors ) { |
|
| 131 | + $this->aAttributes[ 'class' ] = $this->getClassAttribute( |
|
| 132 | + $this->aAttributes[ 'class' ], |
|
| 133 | 133 | $_asSelectors |
| 134 | 134 | ); |
| 135 | 135 | } |
| 136 | - return $this->aAttributes['class']; |
|
| 136 | + return $this->aAttributes[ 'class' ]; |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // $this->aAttributes[ $_aParams[ 0 ] ] = $_aParams[ 1 ]; |
| 159 | 159 | $this->setMultiDimensionalArray( |
| 160 | 160 | $this->aAttributes, |
| 161 | - $this->getElementAsArray( $_aParams, 0 ), // $asAttributeName |
|
| 161 | + $this->getElementAsArray( $_aParams, 0 ), // $asAttributeName |
|
| 162 | 162 | $_aParams[ 1 ] // $mValue |
| 163 | 163 | ); |
| 164 | 164 | } |
@@ -38,11 +38,11 @@ |
||
| 38 | 38 | * Retrieves meta data by given keys and type (user or post). |
| 39 | 39 | * @return array |
| 40 | 40 | */ |
| 41 | - static public function getMetaDataByKeys( $iObjectID, $aKeys, $sMetaType='post' ) { |
|
| 41 | + static public function getMetaDataByKeys( $iObjectID, $aKeys, $sMetaType = 'post' ) { |
|
| 42 | 42 | |
| 43 | 43 | $_aSavedMeta = array(); |
| 44 | 44 | |
| 45 | - if ( ! $iObjectID ) { |
|
| 45 | + if ( !$iObjectID ) { |
|
| 46 | 46 | return $_aSavedMeta; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | : @mysql_get_server_info(), |
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | - foreach( ( array ) $wpdb->get_results( "SHOW VARIABLES", ARRAY_A ) as $_iIndex => $_aItem ) { |
|
| 45 | + foreach ( ( array ) $wpdb->get_results( "SHOW VARIABLES", ARRAY_A ) as $_iIndex => $_aItem ) { |
|
| 46 | 46 | |
| 47 | 47 | $_aItem = array_values( $_aItem ); |
| 48 | 48 | $_sKey = array_shift( $_aItem ); |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | static public function getMySQLErrorLogPath() { |
| 64 | 64 | |
| 65 | 65 | $_aMySQLInfo = self::getMySQLInfo(); |
| 66 | - return isset( $_aMySQLInfo['log_error'] ) |
|
| 67 | - ? $_aMySQLInfo['log_error'] |
|
| 66 | + return isset( $_aMySQLInfo[ 'log_error' ] ) |
|
| 67 | + ? $_aMySQLInfo[ 'log_error' ] |
|
| 68 | 68 | : ''; |
| 69 | 69 | |
| 70 | 70 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * Returns a PHP error log. |
| 74 | 74 | * @since 3.4.6 |
| 75 | 75 | */ |
| 76 | - static public function getMySQLErrorLog( $iLines=1 ) { |
|
| 76 | + static public function getMySQLErrorLog( $iLines = 1 ) { |
|
| 77 | 77 | |
| 78 | 78 | $_sLog = self::getFileTailContents( self::getMySQLErrorLogPath(), $iLines ); |
| 79 | 79 | |
@@ -38,9 +38,9 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $_sQuoteCharactor = "'"; |
| 40 | 40 | $_aOutput = array(); |
| 41 | - foreach( $aAttributes as $_sAttribute => $_mProperty ) { |
|
| 41 | + foreach ( $aAttributes as $_sAttribute => $_mProperty ) { |
|
| 42 | 42 | if ( is_scalar( $_mProperty ) ) { |
| 43 | - $_aOutput[] = "{$_sAttribute}={$_sQuoteCharactor}" . esc_attr( $_mProperty ) . "{$_sQuoteCharactor}"; |
|
| 43 | + $_aOutput[ ] = "{$_sAttribute}={$_sQuoteCharactor}".esc_attr( $_mProperty )."{$_sQuoteCharactor}"; |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | return implode( ' ', $_aOutput ); |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | * @since 3.6.0 |
| 80 | 80 | * @return string |
| 81 | 81 | */ |
| 82 | - static public function getHTMLTag( $sTagName, array $aAttributes, $sValue=null ) { |
|
| 82 | + static public function getHTMLTag( $sTagName, array $aAttributes, $sValue = null ) { |
|
| 83 | 83 | $_sTag = tag_escape( $sTagName ); |
| 84 | 84 | return null === $sValue |
| 85 | - ? "<" . $_sTag . " " . self::getAttributes( $aAttributes ) . " />" |
|
| 86 | - : "<" . $_sTag . " " . self::getAttributes( $aAttributes ) . ">" |
|
| 85 | + ? "<".$_sTag." ".self::getAttributes( $aAttributes )." />" |
|
| 86 | + : "<".$_sTag." ".self::getAttributes( $aAttributes ).">" |
|
| 87 | 87 | . $sValue |
| 88 | 88 | . "</{$_sTag}>"; |
| 89 | 89 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * @return string |
| 94 | 94 | * @deprecated 3.6.0 Use `getHTMLTag()` instead. |
| 95 | 95 | */ |
| 96 | - static public function generateHTMLTag( $sTagName, array $aAttributes, $sValue=null ) { |
|
| 96 | + static public function generateHTMLTag( $sTagName, array $aAttributes, $sValue = null ) { |
|
| 97 | 97 | return self::getHTMLTag( $sTagName, $aAttributes, $sValue ); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | * @since 3.5.3 |
| 53 | 53 | * @return string The site language. |
| 54 | 54 | */ |
| 55 | - static public function getSiteLanguage( $sDefault='en_US' ) { |
|
| 55 | + static public function getSiteLanguage( $sDefault = 'en_US' ) { |
|
| 56 | 56 | return defined( 'WPLANG' ) && WPLANG ? WPLANG : $sDefault; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | $_aInvert = array(); |
| 206 | 206 | foreach( $aModel as $_isKey => $_v ) { |
| 207 | - if ( array_key_exists( $_isKey, $aSubject ) ) { |
|
| 207 | + if ( array_key_exists( $_isKey, $aSubject ) ) { |
|
| 208 | 208 | continue; |
| 209 | 209 | } |
| 210 | 210 | $_aInvert[ $_isKey ] = $_v; |
@@ -256,11 +256,11 @@ discard block |
||
| 256 | 256 | */ |
| 257 | 257 | public static function uniteArraysRecursive( $aPrecedence, $aDefault ) { |
| 258 | 258 | |
| 259 | - if ( is_null( $aPrecedence ) ) { |
|
| 259 | + if ( is_null( $aPrecedence ) ) { |
|
| 260 | 260 | $aPrecedence = array(); |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | - if ( ! is_array( $aDefault ) || ! is_array( $aPrecedence ) ) { |
|
| 263 | + if ( ! is_array( $aDefault ) || ! is_array( $aPrecedence ) ) { |
|
| 264 | 264 | return $aPrecedence; |
| 265 | 265 | } |
| 266 | 266 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @return integer |
| 34 | 34 | * @internal |
| 35 | 35 | */ |
| 36 | - static public function sortArrayByKey( $a, $b, $sKey='order' ) { |
|
| 36 | + static public function sortArrayByKey( $a, $b, $sKey = 'order' ) { |
|
| 37 | 37 | return isset( $a[ $sKey ], $b[ $sKey ] ) |
| 38 | 38 | ? $a[ $sKey ] - $b[ $sKey ] |
| 39 | 39 | : 1; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | static public function unsetDimensionalArrayElement( &$mSubject, array $aKeys ) { |
| 77 | 77 | |
| 78 | 78 | $_sKey = array_shift( $aKeys ); |
| 79 | - if ( ! empty( $aKeys ) ) { |
|
| 79 | + if ( !empty( $aKeys ) ) { |
|
| 80 | 80 | if ( isset( $mSubject[ $_sKey ] ) && is_array( $mSubject[ $_sKey ] ) ) { |
| 81 | 81 | self::unsetDimensionalArrayElement( $mSubject[ $_sKey ], $aKeys ); |
| 82 | 82 | } |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | static public function setMultiDimensionalArray( &$mSubject, array $aKeys, $mValue ) { |
| 98 | 98 | |
| 99 | 99 | $_sKey = array_shift( $aKeys ); |
| 100 | - if ( ! empty( $aKeys ) ) { |
|
| 101 | - if( ! isset( $mSubject[ $_sKey ] ) || ! is_array( $mSubject[ $_sKey ] ) ) { |
|
| 100 | + if ( !empty( $aKeys ) ) { |
|
| 101 | + if ( !isset( $mSubject[ $_sKey ] ) || !is_array( $mSubject[ $_sKey ] ) ) { |
|
| 102 | 102 | $mSubject[ $_sKey ] = array(); |
| 103 | 103 | } |
| 104 | 104 | self::setMultiDimensionalArray( $mSubject[ $_sKey ], $aKeys, $mValue ); |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | $_aNumeric = self::getIntegerKeyElements( $aSubject ); |
| 154 | 154 | $_aAssociative = self::invertCastArrayContents( $aSubject, $_aNumeric ); |
| 155 | - foreach( $_aNumeric as &$_aElem ) { |
|
| 155 | + foreach ( $_aNumeric as &$_aElem ) { |
|
| 156 | 156 | $_aElem = self::uniteArrays( $_aElem, $_aAssociative ); |
| 157 | 157 | } |
| 158 | - if ( ! empty( $_aAssociative ) ) { |
|
| 158 | + if ( !empty( $_aAssociative ) ) { |
|
| 159 | 159 | array_unshift( $_aNumeric, $_aAssociative ); // insert the main section to the beginning of the array. |
| 160 | 160 | } |
| 161 | 161 | return $_aNumeric; |
@@ -178,10 +178,10 @@ discard block |
||
| 178 | 178 | public static function castArrayContents( array $aModel, array $aSubject ) { |
| 179 | 179 | |
| 180 | 180 | $_aCast = array(); |
| 181 | - foreach( $aModel as $_isKey => $_v ) { |
|
| 181 | + foreach ( $aModel as $_isKey => $_v ) { |
|
| 182 | 182 | $_aCast[ $_isKey ] = self::getElement( |
| 183 | - $aSubject, // subject array |
|
| 184 | - $_isKey, // key |
|
| 183 | + $aSubject, // subject array |
|
| 184 | + $_isKey, // key |
|
| 185 | 185 | null // default |
| 186 | 186 | ); |
| 187 | 187 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | public static function invertCastArrayContents( array $aModel, array $aSubject ) { |
| 203 | 203 | |
| 204 | 204 | $_aInvert = array(); |
| 205 | - foreach( $aModel as $_isKey => $_v ) { |
|
| 205 | + foreach ( $aModel as $_isKey => $_v ) { |
|
| 206 | 206 | if ( array_key_exists( $_isKey, $aSubject ) ) { |
| 207 | 207 | continue; |
| 208 | 208 | } |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | public static function uniteArrays( /* $aPrecedence, $aArray1, $aArray2, ... */ ) { |
| 229 | 229 | |
| 230 | 230 | $_aArray = array(); |
| 231 | - foreach( array_reverse( func_get_args() ) as $_aArg ) { |
|
| 231 | + foreach ( array_reverse( func_get_args() ) as $_aArg ) { |
|
| 232 | 232 | $_aArray = self::uniteArraysRecursive( |
| 233 | 233 | self::getAsArray( $_aArg ), |
| 234 | 234 | $_aArray |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | $aPrecedence = array(); |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | - if ( ! is_array( $aDefault ) || ! is_array( $aPrecedence ) ) { |
|
| 262 | + if ( !is_array( $aDefault ) || !is_array( $aPrecedence ) ) { |
|
| 263 | 263 | return $aPrecedence; |
| 264 | 264 | } |
| 265 | 265 | |
@@ -268,10 +268,10 @@ discard block |
||
| 268 | 268 | return $aPrecedence; |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | - foreach( $aDefault as $sKey => $v ) { |
|
| 271 | + foreach ( $aDefault as $sKey => $v ) { |
|
| 272 | 272 | |
| 273 | 273 | // If the precedence does not have the key, assign the default's value. |
| 274 | - if ( ! array_key_exists( $sKey, $aPrecedence ) || is_null( $aPrecedence[ $sKey ] ) ) { |
|
| 274 | + if ( !array_key_exists( $sKey, $aPrecedence ) || is_null( $aPrecedence[ $sKey ] ) ) { |
|
| 275 | 275 | $aPrecedence[ $sKey ] = $v; |
| 276 | 276 | } else { |
| 277 | 277 | |
@@ -302,8 +302,8 @@ discard block |
||
| 302 | 302 | * - NULL |
| 303 | 303 | * @return array The modified array. |
| 304 | 304 | */ |
| 305 | - static public function dropElementsByType( array $aArray, $aTypes=array( 'array' ) ) { |
|
| 306 | - foreach( $aArray as $isKey => $vValue ) { |
|
| 305 | + static public function dropElementsByType( array $aArray, $aTypes = array( 'array' ) ) { |
|
| 306 | + foreach ( $aArray as $isKey => $vValue ) { |
|
| 307 | 307 | if ( in_array( gettype( $vValue ), $aTypes, true ) ) { |
| 308 | 308 | unset( $aArray[ $isKey ] ); |
| 309 | 309 | } |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | */ |
| 320 | 320 | static public function dropElementByValue( array $aArray, $vValue ) { |
| 321 | 321 | |
| 322 | - foreach( self::getAsArray( $vValue, true ) as $_vValue ) { |
|
| 322 | + foreach ( self::getAsArray( $vValue, true ) as $_vValue ) { |
|
| 323 | 323 | $_sKey = array_search( $_vValue, $aArray, true ); |
| 324 | 324 | if ( $_sKey === false ) { |
| 325 | 325 | continue; |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | */ |
| 342 | 342 | static public function dropElementsByKey( array $aArray, $asKeys ) { |
| 343 | 343 | |
| 344 | - foreach( self::getAsArray( $asKeys, true ) as $_isKey ) { |
|
| 344 | + foreach ( self::getAsArray( $asKeys, true ) as $_isKey ) { |
|
| 345 | 345 | unset( $aArray[ $_isKey ] ); |
| 346 | 346 | } |
| 347 | 347 | return $aArray; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $_sOutput = preg_replace( |
| 42 | 42 | array( |
| 43 | 43 | '#^.*<body>(.*)</body>.*$#ms', '#<h2>PHP License</h2>.*$#ms', |
| 44 | - '#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#', |
|
| 44 | + '#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#', |
|
| 45 | 45 | "#[ \t]+#", '# #', '# +#', '# class=".*?"#', '%'%', |
| 46 | 46 | '#<tr>(?:.*?)" src="(?:.*?)=(.*?)" alt="PHP Logo" /></a>' |
| 47 | 47 | .'<h1>PHP Version (.*?)</h1>(?:\n+?)</td></tr>#', |
@@ -52,11 +52,11 @@ discard block |
||
| 52 | 52 | '#</tr>#' |
| 53 | 53 | ), |
| 54 | 54 | array( |
| 55 | - '$1', '', '', '', '</$1>' . "\n", '<', ' ', ' ', ' ', '', ' ', |
|
| 55 | + '$1', '', '', '', '</$1>'."\n", '<', ' ', ' ', ' ', '', ' ', |
|
| 56 | 56 | '<h2>PHP Configuration</h2>'."\n".'<tr><td>PHP Version</td><td>$2</td></tr>'. |
| 57 | 57 | "\n".'<tr><td>PHP Egg</td><td>$1</td></tr>', |
| 58 | 58 | '<tr><td>PHP Credits Egg</td><td>$1</td></tr>', |
| 59 | - '<tr><td>Zend Engine</td><td>$2</td></tr>' . "\n" . '<tr><td>Zend Egg</td><td>$1</td></tr>', |
|
| 59 | + '<tr><td>Zend Engine</td><td>$2</td></tr>'."\n".'<tr><td>Zend Egg</td><td>$1</td></tr>', |
|
| 60 | 60 | ' ', |
| 61 | 61 | '%S%', |
| 62 | 62 | '%E%' |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | unset( $_aSections[ 0 ] ); |
| 69 | 69 | |
| 70 | 70 | $_aOutput = array(); |
| 71 | - foreach( $_aSections as $_sSection ) { |
|
| 71 | + foreach ( $_aSections as $_sSection ) { |
|
| 72 | 72 | $_iIndex = substr( $_sSection, 0, strpos( $_sSection, '</h2>' ) ); |
| 73 | 73 | preg_match_all( |
| 74 | 74 | '#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?%E%#', |
@@ -76,12 +76,12 @@ discard block |
||
| 76 | 76 | $_aAskApache, |
| 77 | 77 | PREG_SET_ORDER |
| 78 | 78 | ); |
| 79 | - foreach( $_aAskApache as $_aMatches ) { |
|
| 80 | - if ( ! isset( $_aMatches[ 1 ], $_aMatches[ 2 ] ) ) { |
|
| 79 | + foreach ( $_aAskApache as $_aMatches ) { |
|
| 80 | + if ( !isset( $_aMatches[ 1 ], $_aMatches[ 2 ] ) ) { |
|
| 81 | 81 | array_slice( $_aMatches, 2 ); |
| 82 | 82 | continue; |
| 83 | 83 | } |
| 84 | - $_aOutput[ $_iIndex ][ $_aMatches[ 1 ] ] = ! isset( $_aMatches[ 3 ] ) || $_aMatches[ 2 ] == $_aMatches[ 3 ] |
|
| 84 | + $_aOutput[ $_iIndex ][ $_aMatches[ 1 ] ] = !isset( $_aMatches[ 3 ] ) || $_aMatches[ 2 ] == $_aMatches[ 3 ] |
|
| 85 | 85 | ? $_aMatches[ 2 ] |
| 86 | 86 | : array_slice( $_aMatches, 2 ); |
| 87 | 87 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @since 3.4.6 |
| 98 | 98 | * @param array|string $asCategory The category key names of the returning array. |
| 99 | 99 | */ |
| 100 | - static public function getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) { |
|
| 100 | + static public function getDefinedConstants( $asCategories = null, $asRemovingCategories = null ) { |
|
| 101 | 101 | |
| 102 | 102 | $_aCategories = is_array( $asCategories ) ? $asCategories : array( $asCategories ); |
| 103 | 103 | $_aCategories = array_filter( $_aCategories ); |
@@ -124,8 +124,8 @@ discard block |
||
| 124 | 124 | static public function getPHPErrorLogPath() { |
| 125 | 125 | |
| 126 | 126 | $_aPHPInfo = self::getPHPInfo(); |
| 127 | - return isset( $_aPHPInfo['PHP Core']['error_log'] ) |
|
| 128 | - ? $_aPHPInfo['PHP Core']['error_log'] |
|
| 127 | + return isset( $_aPHPInfo[ 'PHP Core' ][ 'error_log' ] ) |
|
| 128 | + ? $_aPHPInfo[ 'PHP Core' ][ 'error_log' ] |
|
| 129 | 129 | : ''; |
| 130 | 130 | |
| 131 | 131 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * Returns a PHP error log. |
| 135 | 135 | * @since 3.4.6 |
| 136 | 136 | */ |
| 137 | - static public function getPHPErrorLog( $iLines=1 ) { |
|
| 137 | + static public function getPHPErrorLog( $iLines = 1 ) { |
|
| 138 | 138 | |
| 139 | 139 | $_sLog = self::getFileTailContents( self::getPHPErrorLogPath(), $iLines ); |
| 140 | 140 | |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'. |
| 12 | 12 | */ |
| 13 | 13 | if ( php_sapi_name() === 'cli' ) { |
| 14 | - $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php'; |
|
| 14 | + $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php'; |
|
| 15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
| 16 | 16 | include_once( $_sFrameworkFilePath ); |
| 17 | 17 | } |