title: cakephp Indirect modification of overloaded property PaginatorHelper
body: <p>i have the following search form </p>
  
  <pre><code>&lt;?php
  echo $this-&gt;Form-&gt;create('Order', array('action' =&gt; 'search','type'=&gt;'get'));?&gt;
  &lt;?php echo $this-&gt;Form-&gt;input('SearchTerm',array('label' =&gt; 'Find:')); ?&gt;
  &lt;?php $options=array('full_name'=&gt;'By Name','code'=&gt;'By Code','phone'=&gt;'By Phone','email'=&gt;'By Mail'); ?&gt;
  &lt;?php echo $this-&gt;Form-&gt;input('options', array('type'=&gt;'select', 'label'=&gt;'Search:', 'options'=&gt;$options)); ?&gt;
  
  &lt;?php echo $this-&gt;Form-&gt;end('search'); ?&gt;  
  
  &lt;?php if($rs!=0){?&gt;
  &lt;?php if($rs!=null) { ?&gt;
      results found : &lt;?php print $results; //print_r ($result['Order']['full_name']); ?&gt;
  &lt;h1 class="ico_mug"&gt;Results Matching Term: &lt;?php print '"'.$term.'"' ;?&gt;&lt;/h1&gt;
  &lt;table id="table"&gt;
      &lt;tr&gt;
  
          &lt;th&gt;Client Name&lt;/th&gt;
          &lt;th&gt;Order Code&lt;/th&gt;
          &lt;th&gt;Phone&lt;/th&gt;
          &lt;th&gt;Received Order&lt;/th&gt;
          &lt;th&gt;Working On Order &lt;/th&gt;
          &lt;th&gt;Order Ready &lt;/th&gt;
      &lt;/tr&gt;
  
      &lt;!-- Here is where we loop through our $posts array, printing out post info --&gt;
  
      &lt;?php foreach ($rs as $order): ?&gt;
      &lt;tr&gt;
  
          &lt;td&gt;
              &lt;?php echo $this-&gt;Html-&gt;link($order['Order']['full_name'],
              array('controller' =&gt; 'orders', 'action' =&gt; 'view', $order['Order']['id'])); ?&gt;
          &lt;/td&gt;
          &lt;td&gt;&lt;?php echo $order['Order']['code']; ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $order['Order']['phone']; ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $this-&gt;OrderStatus-&gt;getStatusString($order['Order']['receive_state']); ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $this-&gt;OrderStatus-&gt;getStatusString($order['Order']['working_state']); ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $this-&gt;OrderStatus-&gt;getStatusString($order['Order']['ready_state']); ?&gt;&lt;/td&gt;
          &lt;td&gt; &lt;?php //echo $this-&gt;Html-&gt;link($this-&gt;Html-&gt;image("cancel.jpg"), array('action' =&gt; 'index'), array('escape' =&gt; false));?&gt;&lt;?php echo $this-&gt;Html-&gt;link($this-&gt;Html-&gt;image("edit.jpg"), array('action' =&gt; 'edit',$order['Order']['id']), array('escape' =&gt; false));/*echo $this-&gt;Html-&gt;link('Edit', array('action' =&gt; 'edit', $order['Order']['id']));*/?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php endforeach; ?&gt;
      &lt;tr &gt;&lt;?php //echo $this-&gt;Paginator-&gt;numbers(array('first' =&gt; 'First page')); ?&gt;&lt;/tr&gt;
      &lt;?php
      $urlParams = $this-&gt;params['url'];
      unset($urlParams['url']);
      $optionss=array('url' =&gt; array('?' =&gt; http_build_query($urlParams)));
      //$this-&gt;Paginator-&gt;options($optionss);
      $this-&gt;Paginator-&gt;settings['paramType'] = 'querystring';
  
      ?&gt;
  
      &lt;tr &gt;&lt;?php  //echo" &lt;&lt; ".$this-&gt;Paginator-&gt;counter(
         // 'Page {:page} of {:pages}');
          ?&gt;&lt;/tr&gt;
  
  &lt;/table&gt;
  
   &lt;?php }else echo"no results found"; ?&gt;
  
  
  &lt;?php } //endif?&gt;
  </code></pre>
  
  <p>and this is my controller action </p>
  
  <pre><code>function search($options=null){
          $this-&gt;set('results',"");
          $this-&gt;set('term',"");
          $this-&gt;set('rs',0);    
  
          if ((isset($_GET["SearchTerm"]))||(isset($_GET["options"])) ) {
              $SearchTerm=$_GET["SearchTerm"];
              $options=$_GET["options"];
  
              if (!$options || !$SearchTerm) {
                  $this-&gt;Session-&gt;setFlash('Please enter something to search for');
              }
              else {
                  $SearchArray = array($options." LIKE " =&gt; "%".$SearchTerm."%");
  
                  $this-&gt;paginate = array('conditions' =&gt;  $SearchArray,'limit'=&gt;2,'convertKeys' =&gt; array($options, $SearchTerm));
                  $data=$this-&gt;paginate('Order');
                  $this-&gt;set('rs', $data);
                  $this-&gt;set('term',$SearchTerm);
  
              }
          }
  </code></pre>
  
  <p>as you can see i am using Get parameters options and SearchTerm. I want theese two to stay in the pagination links. I have tried various fixes that i've found on stackoverflow and on other site, (like ex: </p>
  
  <pre><code>$urlParams = $this-&gt;params['url'];
      unset($urlParams['url']);
      $optionss=array('url' =&gt; array('?' =&gt; http_build_query($urlParams)));
  </code></pre>
  
  <p>yet i still get the following error message : </p>
  
  <blockquote>
    <p>Indirect modification of overloaded property
    PaginatorHelper::$settings has no effect
    [APP\View\orders\search.ctp, line 75</p>
  </blockquote>
  
  <p>why is that? and what about a solution to this ? ( even if i use the wxample from the cookbook</p>
  
  <blockquote>
    <p>$this->Paginator->settings['paramType'] = 'querystring';</p>
  </blockquote>
  
  <p>i still get the same error :S can you please help/explain ?</p>