Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
e53f58fb
Commit
e53f58fb
authored
Dec 14, 2005
by
Dries
Browse files
- Patch
#40631
by Chris Johnson: is_array() slower than isset() or empty().
parent
7334f762
Changes
1
Show whitespace changes
Inline
Side-by-side
database/updates.inc
View file @
e53f58fb
...
...
@@ -943,13 +943,13 @@ function system_update_151() {
// insert all entries from theme links into new menus
$num_inserted
=
0
;
if
(
is_array
(
$ts
)
&&
is_array
(
$ts
[
$menus
[
$loop
][
'links_var'
]]))
{
if
(
isset
(
$ts
)
&&
is_array
(
$ts
)
&&
is_array
(
$ts
[
$menus
[
$loop
][
'links_var'
]]))
{
$links
=
$ts
[
$menus
[
$loop
][
'links_var'
]];
for
(
$i
=
0
;
$i
<
count
(
$links
[
'text'
]);
$i
++
)
{
if
(
$links
[
'text'
][
$i
]
!=
""
&&
$links
[
'link'
][
$i
]
!=
""
)
{
$num_inserted
++
;
$node_unalias
=
db_fetch_array
(
db_query
(
"SELECT src FROM
{
url_alias
}
WHERE dst = '%s'"
,
$links
[
'link'
][
$i
]));
if
(
is_array
(
$node_unalias
))
{
if
(
isset
(
$node_unalias
)
&&
is_array
(
$node_unalias
))
{
$link_path
=
$node_unalias
[
'src'
];
}
else
{
...
...
@@ -984,7 +984,7 @@ function system_update_151() {
unset
(
$ts
[
$menus
[
$loop
][
'more_var'
]]);
}
if
(
is_array
(
$ts
))
{
if
(
isset
(
$ts
)
&&
is_array
(
$ts
))
{
variable_set
(
'theme_settings'
,
$ts
);
}
...
...
@@ -1118,7 +1118,7 @@ function system_update_159() {
$vid
=
db_next_id
(
'{node_revisions}_vid'
);
while
(
$node
=
db_fetch_object
(
$result
))
{
$revisions
=
unserialize
(
$node
->
revisions
);
if
(
is_array
(
$revisions
)
&&
count
(
$revisions
)
>
0
)
{
if
(
!
$revisions
&&
is_array
(
$revisions
)
&&
count
(
$revisions
)
>
0
)
{
$revisions_query
=
array
();
$revisions_args
=
array
();
$book_query
=
array
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment