We have moved to Github. Please open tickets there.

Opened 13 months ago

Closed 11 months ago

Last modified 11 months ago

#4483 closed Defect (fixed)

various undefined variable errors

Reported by: mrclay Owned by:
Priority: low Milestone: Elgg 1.8.6
Component: Core Version: 1.8.3
Severity: trivial Keywords:
Cc: brett@… Difficulty:

Description

I inspected the engine directory with PhpStorm and found these undefined var errors. I checked all cases for false positives (e.g. following use of extract).

Many can be fixed by simply replacing the variable with null in the function call argument list, or, if you want to retain the parameter name, func($name = null);. This won't throw a NOTICE.

https://github.com/Elgg/Elgg/blob/1.8/engine/lib/statistics.php#L98 $offset
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/export.php#L121 $to_be_serialized
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/pagehandler.php#L132 $title
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.7.php#L228 $pagination
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.7.php#L593 $fullview
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.7.php#L785 $container_guid
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.7.php#L1034 $fullview
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L1107 $container_guid
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L1180 $pagination
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L1362 $site_guid
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L1438 $owner
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L2281 $entity_type
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L2305 $order_by
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L2519 $event
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L2543 $obj_query
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L2653 $full_view
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L3448 $order_by
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L3506 $timelower / $timeupper
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L3528 $timelower / $timeupper
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L3551 $timelower / $timeupper
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L3575 $timelower / $timeupper
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L3932 $annotation_id
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/deprecated-1.8.php#L3979 $guid
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/configuration.php#L482 $msg
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/admin.php#L574 $title
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/entities.php#L1712 $row (several cases)
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/entities.php#L1771 $msg

Change History (4)

comment:1 Changed 13 months ago by ewinslow

  • Milestone changed from Needs Review to Elgg 1.8.x

Thanks for doing this!

comment:2 Changed 11 months ago by cash

  • Milestone changed from Elgg 1.8.x to Elgg 1.8.6
  • Priority changed from normal to low
  • Severity changed from minor to trivial

comment:3 Changed 11 months ago by Cash Costello

  • Resolution set to fixed
  • Status changed from new to closed

Fixes #4483 fixes undefined variable errors for non-deprecated functions in engine

Changeset: 0ac3aa92df97ea7fd06bdcbb744b6c910cdb09ed

comment:4 Changed 11 months ago by Cash Costello

Fixes #4483 fixes undefined variable errors for non-deprecated functions in engine

Changeset: 0ac3aa92df97ea7fd06bdcbb744b6c910cdb09ed

Note: See TracTickets for help on using tickets.