Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ XP Framework Core ChangeLog

## ?.?.? / ????-??-??

## 6.9.0 / ????-??-??

### Heads up!

* **Heads up: Removed deprecated ensure()**, which has been replaced
by the `finally` statement.
(@thekid)

### Bugfixes

* Fixed xp-framework/core#110: Fatal error location swallowed - @thekid
Expand Down
12 changes: 1 addition & 11 deletions src/main/php/lang.base.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,6 @@ function __error($code, $msg, $file, $line) {
}
// }}}

// {{{ proto deprecated void ensure ($t)
// Replacement for finally() which clashes with PHP 5.5.0's finally
function ensure(&$t) {
if (!isset($t)) $t= null;
}
// }}}

// {{{ proto Generic cast (var arg, var type[, bool nullsafe= true])
// Casts an arg NULL-safe
function cast($arg, $type, $nullsafe= true) {
Expand Down Expand Up @@ -370,9 +363,7 @@ function with() {
if (($block= array_pop($args)) instanceof \Closure) {
try {
call_user_func_array($block, $args);
} catch (\lang\Throwable $e) {
// Fall through
} ensure($e); {
} finally {
foreach ($args as $arg) {
if (!($arg instanceof \lang\Closeable)) continue;
try {
Expand All @@ -381,7 +372,6 @@ function with() {
//
}
}
if ($e) throw($e);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.8.1-dev
6.9.0-dev