mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX make augmentSQL API consistent for strict PHP
This references silverstripe/silverstripe-translatable#113 For that issue, we needed to have the DataQuery as the second parameter to DataQuery's augmentSQL call. Fortunately, DataQuery was already passing this argument. However, where the function was defined in DataExtension, the argument was not present. Thus, subclasses of DataExtension could not add the parameter to their function signature if they were running in PHP strict mode because PHP will complain that the signatures don't match.
This commit is contained in:
parent
5d97f615ce
commit
ab40dcc0ca
@ -42,7 +42,7 @@ abstract class DataExtension extends Extension {
|
|||||||
*
|
*
|
||||||
* @param SQLQuery $query Query to augment.
|
* @param SQLQuery $query Query to augment.
|
||||||
*/
|
*/
|
||||||
public function augmentSQL(SQLQuery &$query) {
|
public function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +38,7 @@ class Hierarchy extends DataExtension {
|
|||||||
*/
|
*/
|
||||||
private static $node_threshold_leaf = 250;
|
private static $node_threshold_leaf = 250;
|
||||||
|
|
||||||
public function augmentSQL(SQLQuery &$query) {
|
public function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function augmentDatabase() {
|
public function augmentDatabase() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user