mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Use square brackets instead of braces for string access. props hakre, fixes #13900.
git-svn-id: https://develop.svn.wordpress.org/trunk@16340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ $import_root = ABSPATH.$import_loc;
|
||||
$imports_dir = @ opendir($import_root);
|
||||
if ($imports_dir) {
|
||||
while (($file = readdir($imports_dir)) !== false) {
|
||||
if ($file{0} == '.') {
|
||||
if ($file[0] == '.') {
|
||||
continue;
|
||||
} elseif (substr($file, -4) == '.php') {
|
||||
require_once($import_root . '/' . $file);
|
||||
|
||||
@@ -1258,7 +1258,7 @@ function get_media_item( $attachment_id, $args = null ) {
|
||||
$hidden_fields = array();
|
||||
|
||||
foreach ( $form_fields as $id => $field ) {
|
||||
if ( $id{0} == '_' )
|
||||
if ( $id[0] == '_' )
|
||||
continue;
|
||||
|
||||
if ( !empty( $field['tr'] ) ) {
|
||||
|
||||
@@ -576,7 +576,7 @@ function win_is_writable($path) {
|
||||
* see http://bugs.php.net/bug.php?id=30931
|
||||
*/
|
||||
|
||||
if ( $path{strlen($path)-1} == '/' ) // recursively return a temporary file path
|
||||
if ( $path[strlen($path)-1] == '/' ) // recursively return a temporary file path
|
||||
return win_is_writable($path . uniqid(mt_rand()) . '.tmp');
|
||||
else if ( is_dir($path) )
|
||||
return win_is_writable($path . '/' . uniqid(mt_rand()) . '.tmp');
|
||||
|
||||
Reference in New Issue
Block a user