# Call to undefined function is()

**URL:** <https://discourse.cakephp.org/t/call-to-undefined-function-is/3879>\
**Category:** Uncategorized\
**Tags:** i18n\
**Created:** [February 6, 2018, 7:48am UTC](https://discourse.cakephp.org/t/call-to-undefined-function-is/3879 "2018-02-06T07:48:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flatman](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@Flatman](https://discourse.cakephp.org/u/Flatman)\
**Post date:** [February 6, 2018, 7:48am UTC](https://discourse.cakephp.org/t/call-to-undefined-function-is/3879/1 "2018-02-06T07:48:52Z")

</div>

Hi, more recently I started to deal with CakePHP, I’m writing a function to add a material with a modal form (PopUP - a flashing window) to the database, I registered a function that should keep all the contained forms in the database, but when I refresh the page I get an error `Call to undefined function is ()`, tell me, please, where I made a mistake when writing functions. Listing of the function I am attaching:  
public function index() {  
// debug($this-\>request-\>data);  
if ($this-\>request-is(‘post’)){  
$this-\>Tets-\>create();  
if($this-\>Test-\>save($this-\>request-\>data)){  
$this-\>Session-\>setFlash(‘Good’);  
$this-\>redirect([‘action’ =\> ‘index’]);  
} else{  
$this-\>Session-\>setFlash(‘Error’);  
}  
}

```
    }
```

---

<div class="post-metadata">

**Author:** ![Graziel](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@Graziel](https://discourse.cakephp.org/u/Graziel)\
**Post date:** [February 6, 2018, 8:26am UTC](https://discourse.cakephp.org/t/call-to-undefined-function-is/3879/2 "2018-02-06T08:26:42Z")

</div>

> if ($this-\>request-is(‘post’)){

you have minus (-) instead of object operator (-\>)
