Type checks #911

Merged
merged 12 commits into from Oct 25, 2012

Projects

None yet

5 participants

@dogmatic69
Contributor

Seems like github is not showing on the other one as it has been closed.

@bar

Shouldn't it be ($model->recursive === 0) without the ! ?¿

yes, it should. why not leaving it as it was here? Since users could use "0" (even if thats not really pretty) as a string here and I dont see any casting going on.

dogmatic69 added some commits Sep 21, 2012
@dogmatic69 dogmatic69 converting if ($foo != null) to if ($foo) b1f26b5
@dogmatic69 dogmatic69 converting if ($foo != false) to if ($foo) 8dc4de5
@dogmatic69 dogmatic69 converting if ($foo != "") to if ($foo) 36314e6
@dogmatic69 dogmatic69 fixing error pointed out by dereuromark with recursive cakephp#846 (c… cd99b7d
@dogmatic69 dogmatic69 undo the change to avoid change in behavior 1b36853
@dogmatic69 dogmatic69 Merge branch '2.3' into type-checks
Conflicts:
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Controller/Component/RequestHandlerComponent.php
	lib/Cake/Model/Datasource/Database/Mysql.php
	lib/Cake/Utility/CakeNumber.php
408e619
@dogmatic69 dogmatic69 Merge branch '2.3' into type-checks
Conflicts:
	lib/Cake/Error/ExceptionRenderer.php
	lib/Cake/Routing/Dispatcher.php
641ba9f
@dogmatic69
Contributor

New version of #846

@ADmad ADmad commented on the diff Oct 24, 2012
lib/Cake/Controller/Controller.php
@@ -966,14 +966,15 @@ public function render($view = null, $layout = null) {
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::referer
*/
public function referer($default = null, $local = false) {
- if ($this->request) {
- $referer = $this->request->referer($local);
- if ($referer == '/' && $default != null) {
- return Router::url($default, true);
- }
- return $referer;
+ if(!$this->request) {
@ADmad
ADmad Oct 24, 2012 Member

Missing space after if

@markstory
Member

I'm going to merge this now, and fix the lint errors afterwards.

@markstory markstory merged commit 2841611 into cakephp:2.3 Oct 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment